Quite often, when using CTRL-O
to jump back to an older position, vim takes me to other files I've been editing previously. Is there a command, to go back within the jumplist just in the current file?
3 Answers
There is command that is close to what you need: g;
will bring you back to older change position, g,
will go forward to newer change position .
List of change position can be displayed with :changes
.
My EnhancedJumps plugin offers separate special mappings that restrict the jump targets to only local locations (in the same buffer) and remote locations (only in other buffers).
-
Your answer is probably the correct one to my question, but tivn's answer feels more like the vim-way of accomplishing what I need to do. Thanks anyway!– SkWobApr 28, 2015 at 10:00
Yes, backtick-backtick:
``
goes back to the previous mark (but only the previous mark) in the current buffer.