In Vim, if I issue a jump command, e.g. G
, then I can put the cursor back where it was before the jump by using Ctrl-o
. However, Ctrl-o
would not put my cursor back to the previous spot if I issued a movement command like 40j
or Ctrl-f
, since they don't alter the jump list. Is there a command which will undo movements such as those?
To be clear, I'm not looking for a "manual" answer, such as 40k
gets you back from 40j
, since such a command is not generically applicable in the way that Ctrl-o
works.
Also, if no built-in command does this, then does any plugin do it?