Step 1 of 6

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 — lesson 18 attaches one)

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 starts with a warm-up from lesson 14, then has you make three jumps of different kinds. Each one adds an entry to the jumplist.

  1. Open notes.txt with the file picker Warm-up from lesson 14 — the Space menu has a picker for files.
  2. Come back to exercise.txt with the buffer picker The same menu has a picker for open buffers.
  3. Jump to line 10 A counted goto — a jump like this is exactly what the jumplist records.
  4. Search for line 20 Search for the text of line 20 — helix jumps to the match while you type. A search is a jump too.
  5. Press Enter, then jump to the last line Commit the search, then the jump to the end of the file — one more entry.
Open notes.txt with the file picker Warm-up from lesson 14 — the Space menu has a picker for files.

Next: Come back to exercise.txt with the buffer picker

Loading editor…