On Di, 07 Mär 2023, Enan Ajmain wrote:
> To answer your question, vim motions are of two types:
> - ':h inclusive'
> - ':h exclusive'
>
> I don't understand that helpdoc well, but I understand that this is the
> reason 'yb' excludes the character the cursor was on. For fun, try
> 'yge', which is an inclusive motion. It's not a substitute of 'yb'
> (you'll see why when you try). It's just to demonstrate the reason why
> 'yb' behaves unintuitively.
Try using yvb which should force the motion to be inclusive, e.g.
include the right-most character. See :h o_v
> It's not gonna be changed upstream, but I bet patching your own copy of
> vim won't be too hard. If I were using 'yb' as often as you seem to be,
> I would've tried patching it.
That makes it even more confusing, if you'll have to use a non-patched
Vim.
Best,
Christian
--
Alles ist schon einmal gesagt worden, aber da niemand zuhört, muß man
es immer von neuem sagen.
-- André Gide