0

I am convinced that a separate tag text-objects or text-object-select is useful. Text objects can only be used in visual-mode or after an operator (:h text-objects).

A possible misunderstanding can be the so-called text-object-motions. However, the description of the new tag should clarify this.

Text objects with tag [text-object] are

aw iw aW iW as is ap ip a] a[ i] i[ a) a( ab i) i( ib a> a< i> i< at it a} a{ aB i} i{ iB a" a' a` i" i' i`

(:h text-objects or :h object-select)

Plugins: vim-textobj-user, targets.vim, vim-sandwich, vim-commentary (e.g. dgc), vim-matchup (i%, a%)
Ftplugins: $VIMRUNTIME/ftplugin/ruby.vim (im,am,iM,aM), vim-go (ic,ac,if,af), python-mode (iC,aC,iM,aM), vimtex (ic,ac,id,ad,ie,ae,i$,a$,iP,aP), jdaddy.vim (aj), vim-gitgutter (ic, ac)

Motions with tag [cursor-motions] including :h text-object-motions are

` # $ % ^ * ( ) 0 _ - + w W e E t T I o O { } [[ [] ][ ]] [m [M ]m ]M [( ]) [{ ]} | A f F ge gE gg G g0 gm g^ g$ g_ g, g; gj gk gI h H j k l L ; ' z. z z- zz zt zb b B n N M , / ? zj zk

(:h left-right-motions :h up-down-motions :h word-motions :h text-object-motions)

Ftplugins with definitions for [[ [] ][ ]] [m [M ]M ]m (e.g. $VIMRUNTIME/ftplugin/ruby.vim or $VIMRUNTIME/ftplugin/python.vim)

UPDATE

List of questions question without the tag [cursor-motions] (#4):

IMHO tags [normal-mode], [key-bindings], [keymap] could be replaced by the tag [text-object] for these questions.

List of questions with the tag [cursor-motions] but are actually about [text-objects] (#14):

Questions where both tags should apply (#5):

These are 23 questions. This means the tag [text-object(-select)] would be more often applied than most tags with a typical count of 14 or less (https://vi.stackexchange.com/tags?page=5&tab=popular page 5 of 10).

  • 1
    Tags don't exist in ether, they exist because questions are tagged with them. If a separate tag must exist, show us currently existing questions which would benefit from the new tag. – muru Aug 16 '18 at 19:38
  • Very funny! The tag [text-objects] is marked as a synonym [cursor-motion], i.e. it already exists. I will add to the question a list of questions which I think could be differentiated from questions about cursor motions. – Hotschke Aug 17 '18 at 5:06
  • 1
    A quick glance at the first three examples indicate they are about cursor motion: "This makes it difficult to navigate through them in Vim" ... "would like a more efficient way to do this without having to move the cursor twice" (granted, trying to avoid unnecessary motion here) ... "ci" will make it jump to the quoted area" ... You might want to find better examples. – muru Aug 17 '18 at 8:34
  • I think here is misunderstanding. I NEVER use a textobject for cursor motion. Afaik they only work in combination with an operator or in visual mode. Also the second example you have looked at explicitly states Is there any command that I can use e.g. y[movement] to copy the entire buffer without moving the cursor? And here should in square brackets stand [text-object]. If the cursor moves due to the operation, this is something that vim has decided due to the change (in case of yanking unnecessarily). See third example where I can agree that both tags should apply. – Hotschke Aug 17 '18 at 8:49
  • 2
    " Please be clear and not force me to search for more examples where I have already listed good ones.... You just decided to look at the first three where I have already given 18!!!!" Eh, your first three examples don't look so good to me, so why should I waste my time digging through what may well be equally poor examples? At any rate, I'm done with this. Let the others decide. – muru Aug 17 '18 at 8:58
  • BTW the first question mentions clunky movement but narrows the question to I would prefer to be able to use something along the lines of ciq ("change in quotes"), just like I can do ciw, ca), ci", ca', etc. These are all change commands. The title is clear, just the motivational text mentions movement. The intention of the OP is clearly about how to apply the change operator. I think you did not look close enough. You also just ignored my arguments and just referred to the selected question. I agree: we won't find any agreement. First bad encounter for me here on vi.stackexchange.com. – Hotschke Aug 17 '18 at 9:06
2

a separate tag text-objects or text-object-select is useful

Why do you think it would be useful?

Remember, tags are not here to sort things by category, but to make it easier to find questions to answer. For example, I follow the and because I work a lot with Go and help maintain the vim-go plugin, so there is a high chance I can answer questions people have about that.

This is the purpose of tags: to connect experts in a topic with questions.

But can the same be said about "text objects" or "cursor motions"? Probably not so much. I can have an expertise in "vim-go", but can you have an expertise in "text objects"?

I think a lot of existing tags on this site are similarly useless, and are simply "basic usage". Looking at our list of most popular tags then some (, , , etc.) are useful, as you can be an expert in those topics. But are there experts in , , , , , ? Probably not.

I think that for the most part the tags aren't especially harmful, so I never did much about it (also, I have other things to do), but I don't think that spending a lot of time re-tagging existing questions to one of those "basic usage"-tags is not a very fruitful way to spend time. If anything, I think we should just remove the tag.

  • Thanks for sharing your thoughts. I think I pointed out that there are questions targeting text-objects and not a cursor motion. If I want to search for a question for text-objects but not for cursor motion, this is not possible. I was thinking this is obvious. I do not agree with you that tags cannot be used to categorize questions. Also your criteria for a valid tag (be expert for a tag) is too narrow. Obviously the neovim tag can easily misused (this is true for other as well but is more likely). I removed the neovim tag from a question which had nothing to do with anything neovim specific. – Hotschke Aug 23 '18 at 5:30
  • Also combining tags is very useful, e.g. ft-plugin + feature (e.g. text-object). This requires tags of different types. You mention visual-mode, autocmd, substitute, indentation, insert-mode are not useful tags. Again I strongly disagree. Also with 6200 question, existing tags can be fixed with time when someone comes across. I would also suggest that you have a look at following question vi.stackexchange.com/questions/17094/… with the single tag normal-mode. I think this question needs at least the tag text-object and likely filetype-tex. – Hotschke Aug 23 '18 at 5:41
  • To cite help 'Tags can also be used to help you identify questions that are interesting or relevant to you.' This is true for the tag text-object. And finally, I also disagree with you that the tag cursor-motion should be removed. – Hotschke Aug 23 '18 at 5:41
  • BTW: no one has yet answered my original question. Why do people think that text-object and cursor-motion are synonyms? (and here on meta you have even the tag tag-synonyms: apparently there must be experts on tag-synonyms :-). ) – Hotschke Aug 23 '18 at 6:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .