7

I like the functionality of <C-O> and <C-I> to go back and forth to different positions. But many times I would prefer to stay within the current buffer, and always get taken by surprise when a new buffer opens up replacing the one I was looking at.

(1) Is there a way to achieve this? i.e., limit <C-O> and <C-I> to the same buffer?

(2) Is there a way to visit all cursor moves, even those that are not normally considered jumps, e.g. 10k?

Jeet
  • 34,464
  • 5
  • 46
  • 51
  • 1
    I found a solution in another question, check this one: http://stackoverflow.com/questions/7066456/vim-how-to-prevent-jumps-out-of-current-buffer – Ethan Zhang May 01 '12 at 00:40

1 Answers1

4

As for moving in the same file, check out the '' command. It will jump back and forth between the current location and the last jump.

rlduffy
  • 598
  • 3
  • 8
  • Thanks. But I was hoping for a much longer stack of jumps tracked, not just the the last one. – Jeet Sep 17 '10 at 00:32