Step 3 of 7

Navigating to the ends of the line

Navigating to the ends of the line

We’re not just interested in jumping to specific lines; we also want to navigate within that line.

We could just use h and l (or the arrow keys) to move left and right one character at a time, but there are better ways. Helix gives us a few tools for navigating horizontally in the line, and this step covers the two simplest.

They live in the goto menu from the last step: gh jumps to the start of the line and gl to the end. There are also I and A, which do the same thing but automatically drop you into insert mode. That’s useful if you want to quickly insert some new text at the start or end of the line.

Work through the checklist below — and have a play with I and A on your own while you’re there (remember Escape to get back out).

  1. Jump to the end of the line With the cursor on the top line, type gl.
  2. Jump back to the start of the line To snap back to the first character, type gh.
Jump to the end of the line With the cursor on the top line, type gl.

Next: Jump back to the start of the line

Loading editor…