How to move forward and backward in Emacs' mark ring

Viewed 9327

In Emacs, C-u C-SPC will "jump to the mark, and set the mark from position popped off the local mark ring". Is there a way to go the opposite way around the mark ring? Say you have typed C-u C-SPC several times and want to go back to a mark you have seen without going all the way around the ring.

8 Answers

Not directly answer for this question for emacs keybindings.

For evil users

I found better-jumper for evil users. If you are interested with evil-mode honestly offering to use.

By using How it's offer in it's main repository

(with-eval-after-load 'evil-maps
  (define-key evil-motion-state-map (kbd "C-o") 'better-jumper-jump-backward)
  (define-key evil-motion-state-map (kbd "<C-i>") 'better-jumper-jump-forward))

It's really easy to go back and forward to old positions of the cursor.

Additional you can create new scenarios by using it's hook function like if I change the buffer mark the old point etc.

For emacs key binding fans

Only advice which I can give for default-keybinding style is helm-all-mark-rings. It gives best visibility about mark-rings.

Related