In Vim, Ctrl-I takes the cursor back to its previous location (before the last jump). Ctrl-O is its complement, moving forward through the jumplist. gg jumps to the top of the file, so Ctrl-I then jumps back.
The equivalent to Ctrl-I in Emacs would be C-u C-space. However, the obvious way to get to the top of the file, Home, doesn't set the mark, so there's no way to return to the line you came from that way.
Is there a better set of commands for getting to the top and bottom of the file (and perhaps other places) that does respect the mark ring? Or is there a better way to reverse Home?
C-SPC
M-<
to go to the top. C-u C-SPC
(or C-x C-x C-g
) to get back again.
(C-x C-x g
does not change the mark-ring
. C-x C-x
swaps point and mark, and activates the region. C-g
then deactivates the region.)
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