Step 2 of 6

Walking back and forward

Walking back and forward

Two keys walk the jumplist:

  • Ctrl-o — jump back to the previous position
  • Ctrl-i — jump forward again

Every Ctrl-o takes you one entry further into the past, and Ctrl-i undoes that one entry at a time. Pressing Ctrl-o for the first time also records where you are right now, so Ctrl-i can always bring you all the way back to where you started.

To a terminal, Tab and Ctrl-i are literally the same key, so Tab works for jumping forward as well — some people find it easier to reach.

The checklist below seeds the jumplist with three goto-line jumps, then rides Ctrl-o and Ctrl-i back and forward through those entries. Keep an eye on the line number at the right end of the statusline as you go.

  1. Jump to line 10 A counted goto — the first entry for the jumplist.
  2. Jump to line 20 Another counted goto — another entry.
  3. Jump to line 30 One more.
  4. Jump back with Ctrl-o One step back through the jumplist — you'll return to line 20, where you were before the last jump.
  5. Go back once more Another step back — this time you'll land on line 10.
  6. Come forward again with Ctrl-i Forward through the jumplist — back to line 20.
Jump to line 10 A counted goto — the first entry for the jumplist.

Next: Jump to line 20

Loading editor…