New answers tagged

0

I believe it is worth mentioning the plugins: targets.vim, vim-easymotion, vim-paraglide.


1

I take them as "completely different things". Just w is a normal mode command/mapping. But after you press y you get into operator-pending mode. So w from yw fully belongs to that mode. And they can be (although shouldn't be) remapped to do something else independently. This is the same as "normal" y vs. "visual" y. Both are referred as simply "yank", but ...


1

A text object is a defined portion of text. Thus, operations you apply to them can be triggered on them (when basically you are inside this object), and as you pointed they have and inside and outside. Motions behave differently, in the sense that they are triggered from your cursor position, to where your motion points. The relation between them is ...


3

You've described most of the differences yourself. The one thing you didn't note specifically is that motions move the cursor in a single direction, whereas text objects are bi-directional: they define an area that expands in both directions from the cursor. (This also makes it clear why a text object can't work as a motion by themselves: they cannot move ...


1

As jecxgo points out, the problem is that the obvious solution of recording a macro that processes a single line and then applying that to the selection of lines with :normal fails because, when the lines are expanded, this messes with the other lines in the range. jecxgo solves this by not expanding the lines within the macro but instead doing so in a ...


Top 50 recent answers are included