Getting to Black Belt in Vim – Part 1 – White Belt

Vim is awesome. But it can be overwhelming if you’re just starting out. In this series of articles, we’ll structure learning Vim like learning a martial art1. We’ll build solid foundations at white belt, building up to advanced moves at black belt. First, let’s start with the basics at white belt level.

White Belt

  • In your terminal, type vim <filename> to start editing a file.
  • Hit i to enter insert mode. You can now start typing like any other editor. Hit <Escape> when finished to return to normal mode.
  • Hit u to undo, <Ctrl>+r to redo.
  • Use h to move left, j to move down, k to move up and l to move right. This was one of the hardest things to master when I started learning!
hjkl with directional arrows
Moving around in Vim using hjkl
  • Hit x to delete a character.
  • Type :w to save your file. Type :q to quit Vim. You can combine these by typing :wq, which will write the file and close Vim.

This is all you need to start editing a file. You’ll be super slow, but at the very least, you’ll be able to edit a file.

In part two, we’ll see how we can build on these moves to build speed.

  1. I chose ITF Taekwondo, as that’s the one I’m most familiar with: https://en.wikipedia.org/wiki/International_Taekwon-Do_Federation ↩︎