Step 6 of 8

Navigating between windows

Navigating between windows

Only one window is active at a time — the one holding your cursor. To get the full power out of the windowing system, you need to get fast at zipping between windows.

Happily, it’s the same keys as moving the cursor — hjkl — inside the window menu, to tell Helix “I mean windows”: Space-w h moves left, Space-w j down, Space-w k up, and Space-w l right. (The arrow keys work in the menu too, if you’re not a fan of hjkl.)

There are two files alongside the editor’s exercise.txt: a.txt and b.txt. Work through the checklist: build a little window layout out of them, then move your cursor around it.

  1. Open a.txt in a horizontal split Two stacked windows, with your cursor landing in the lower one — type :hsplit a.txt and press Enter.
  2. Hop to the window above with Space-w k Back up into exercise.txt — press Space, then w, then k.
  3. Hop back down with Space-w j Press Space, then w, then j — you're in a.txt again.
  4. Open b.txt in a vertical split The lower window splits side by side — type :vsplit b.txt and press Enter.
  5. Hop left with Space-w h Press Space, then w, then h — back into a.txt.
Open a.txt in a horizontal split Two stacked windows, with your cursor landing in the lower one — type :hsplit a.txt and press Enter.

Next: Hop to the window above with Space-w k

Loading editor…