Step 1 of 6

Moving the cursor

Moving the cursor

This lesson explores basic navigation in Helix. Helix gives you lots of ways to move around a document, but we’ll start from the beginning.

The first thing to learn is moving the cursor around with the keyboard. Since Helix is a terminal-first application, you can do absolutely everything without touching the mouse.

The simplest possible navigation is moving the cursor up, down, left, and right from its current position. In Helix, you can do this with either:

  • the arrow keys, just like in other editors
  • h, j, k, and l to move one character left, down, up, and right respectively

You might be wondering: should I use the arrow keys, or should I use hjkl? The truth is that it doesn’t matter too much at this early stage. That said, seasoned Helix users usually prefer hjkl, because your fingers don’t leave the home row on your keyboard. Incorporating hjkl into your workflow will make you faster, but it can be tricky to build up the muscle memory. At the moment, use the arrow keys if it’s more comfortable.

One more thing to notice before you start: the cursor itself is a selection, one character wide. Every motion in Helix moves that selection, and most of them grow it along the way — we’ll lean on that from the next lesson on.

Work through the checklist below — the arrow keys and hjkl both count.

  1. Move down to the h and l line Press j (or the down arrow) until the cursor is on the line that reads < h --+-- l >.
  2. Slide sideways onto the + Now press h or l (or the left/right arrow) to move along that line until you land right on the +.
  3. Climb back up to the top line Head back to the first line — press k (or the up arrow) until you're there.
Move down to the h and l line Press j (or the down arrow) until the cursor is on the line that reads < h --+-- l >.

Next: Slide sideways onto the +

Loading editor…