how to jump back to the previous edit place
VimVim Problem Overview
Is it possible to go back to the previous edit place in vim? I know using marks, one can move back and forth between different places within a file, but I don't know whether or not vim could automatically remember the previous edit place for you.
Vim Solutions
Solution 1 - Vim
I use the following (from the documentation):
g; Go to [count] older position in change list.
g, Go to [count] newer cursor position in change list.
Do :help g,
to read more about this
Solution 2 - Vim
The last change is held in the mark named .
so you can jump to the mark with `. (backtick, dot) or '. (apostrophe, dot). See:
:help mark-motions
:help '.
Solution 3 - Vim
ctrl+o
ctrl+i
to go forward (once you've gone backward, of course)
Solution 4 - Vim
To jump to the last edit position type gi.
Solution 5 - Vim
I used to use u
then Ctrl-r
before I learned about '.