This is something that has bugged me for a long time, but I've never gotten around to asking about. Say the text in your buffer looks like this:
Hello
World
If I put my cursor somewhere in line 2, and do yk, my cursor will end on line 1. This seems to imply an operator plus a motion also moves the cursor. However, if I start on line 1 and do yj, my cursor remains in the same spot. The same inconsistency happens with a lot of keys.
Moves Doesn't move
gg G
h l
{ }
( )
T t
F f
? /
So what's with this behavior? Is this expected and well documented? Is there a name for this? Can it be overridden?
In general, it seems like "Backwards moves, forwards does not", but is there a way I can definitively tell whether or not an operator+motion will move the cursor or not?
y
is an operator, not a command.