VIM Tips: Jump between cursor positions
Just recently had to look up how to return to my cursor position after jumping to the beginning of my file.
Jump to old/prev cursor position: Ctrl + o Jump to new/next cursor position: Ctrl + i
Sample usage scenario: You need to look up a variable definition at the top of your file.
Type "gg" to jump to the beginning of your file
Once you've seen your variable name, simply type "Ctrl + o" to jump back to where you were.
Someone in your office farted and in your laughter you forgot the variable name again! Hit "Ctrl + i" to jump back to the top of the file and then hit "Ctrl + o" to go back to your position further down into the file.












