Step 4 of 7

Jumping to a character

Jumping to a character

gh and gl only take you to the ends of the line. If you want a more precise position somewhere in the middle, the f and t commands in normal mode are your friends!

  • f, followed by a character, jumps the cursor forwards onto the next instance of that character
  • t, followed by a character, jumps forwards till that character — it stops one short

Notice that each jump highlights everything between where you were and where you landed: in Helix, every motion is also a selection. We’ll put that to work in the next lesson.

Both have backwards twins, F and T, and Alt-. repeats whichever jump you made last. The demo has a table of all of them — try them once you’ve worked through the checklist below. The count trick in the next step is another way to reach a later X.

  1. Jump forward to a character With the cursor at the start of the line of Xs, Ys, and Zs, jump to the first X after it with fX.
  2. Stop just before the next one To land on the character right before the next X, type tX.
Jump forward to a character With the cursor at the start of the line of Xs, Ys, and Zs, jump to the first X after it with fX.

Next: Stop just before the next one

Loading editor…