Getting Good at Vim


I have used Vim to write code for about a year, and I can confidently say that Vim does two things for me well. The most obvious thing is the cut down on my text editing time. If you consider the amount of time you spend highlighting with the mouse and then returning back to the keyboard to edit text, daily, over a course of a year that time begins to adds up.

Think about how you would complete these Vim commands in your current text editor:

  • dw – Delete a word.
  • gg – Jump to the top of the page.
  • 2W – Moving the second word of a sentence.
  • dd – Delete a line.

Notice these actions all involve the mouse, which brings me to my next point. Most importantly, using vim keeps my mind in the context of typing. The mouse forces you to leave this context of typing and disrupts your direct thoughts and flow. The ability to instantly have your thoughts in the text editor without interruption is a superpower.

One of the biggest myths I hear often about Vim is that it has a huge learning curve. Vim can easily be compared to learning to drive. When a novice driver drives, she is alert and is actively putting thought into every motion of driving. Once our driver reaches an intermediate level, she will drive without thinking about it. But you have to start, and you have to follow through. You will not master Vim in one sitting. But I contend that you can still start using it regularly after 15 minutes of use.

To help you start, here’s a little trick you may not be aware of: Open your terminal and type vimtutor.

Good luck!

Author: Edward Reed II

More Posts by Edward Reed: