How can I restore cursor position in Vim as it was before scrolling, selecting or PgUp/PgDn?
I'm tired of searching where I was before I scrolled up to look something at the top.
Are there something like "Prev cursor position" and "Next cursor position" commands (like 'u' and 'R' for regular undo/redo)?
Example: Looking somewhere in the middle of the source file (no editing), then jumping to the top (1G) then failing to find where you was before that. Of course, no marks set. (I know that I can use ":sp" to view several places simultaneously).
Update. The question is still open, I have received a follow-up:
The answerers didn't understand your question and the answers were too weak of a solution. c-o & c-i don't work for movements.
If I understood correctly, I find that your question was un-answered and that you were looking for a solution for a scenario like this:
As I am vim beginner I frequently do incorrect movements and actions and would like to undo them as though I had never pressed anything, returning to my previous editing location before I started messing up.
So, are there any standard or non-standard (involving patches to Vim or Vim extensions) ways to make it remember the cursor movement history?