Step 1 of 5

What the jumplist is

What the jumplist is

Most of the time we’re reading code rather than writing it: following a function call to its definition, checking a type, glancing at a test. Each of those hops takes you a long way from where you were, and sooner or later you want to get back.

Helix keeps track of this for you with the jumplist. Whenever a command moves the cursor a “significant distance”, Helix records the position you were in before it ran. Moving one line with j doesn’t count, and neither does 14j, but these do:

  • gg and ge — the start and end of the file
  • 10gg — any goto-line jump with a count
  • /pattern — a search
  • most of the other goto-mode commands, like gd for a definition (that one needs a language server, which this embedded editor lacks)

The jumplist is per window, and it only remembers positions — nothing about what you typed to get there. Walking back along those positions is what the next step is about.

The checklist below has you make three jumps of different kinds. Each one adds an entry to the jumplist.

  1. Jump to line 10 Type 10gg — a jump like this is exactly what the jumplist records.
  2. Search for line 20 Type /line 20 — helix jumps to the match while you type. A search is a jump too.
  3. Press Enter, then jump to the last line Enter commits the search, then ge goes to the end of the file — one more entry.
Jump to line 10 Type 10gg — a jump like this is exactly what the jumplist records.

Next: Search for line 20

Loading editor…