in VIM editor as I know there is a command `.
to return exactly to where we left in VIM.
But my question is, how to make it automatic, what I mean is, everytime I exits and enter the same file again, it brings me to the point where I left.
I saw my friend's VIM has that behavior but he doesn't know how to do it.
Thanks guys!
Vim makes it easy to navigate previous locations: Ctrl + o navigate to the previous location in the jump list (think o as old) Ctrl + i navigate to the next location in the jump list ( i and o are usually next to each other) g; go to the previous change location.
Press <shift-N> to go back to the previous occurrence of your find term.
In insert mode, Ctrl-o escapes user to do one normal-mode command, and then return to the insert mode. The same effect can be achieved by <ESC> ing to normal mode, doing the single command and then entering back to insert mode.
I use these commands a lot:
CTRL-O Go to [count] Older cursor position in jump list (not a motion command).
CTRL-I Go to [count] newer cursor position in jump list (not a motion command).
ma Set mark a
at cursor position (does not move
the cursor, this is not a motion command).
'a Jump to the mark a
in the current buffer.
gi Insert text in the same position as where Insert mode was stopped last time in the current buffer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With