Skip to content

Instantly share code, notes, and snippets.

@jwietelmann
Forked from EdwardReed/gist:0a69e7af1a2fb8dfd841
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jwietelmann/850002bdcecefa355504 to your computer and use it in GitHub Desktop.
Save jwietelmann/850002bdcecefa355504 to your computer and use it in GitHub Desktop.
layout author title
post
edward
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 that it cuts 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 the 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 the second word of a sentence.
  • :dd - Delete a line.

More importantly, using Vim keeps my mind in the context of typing. The mouse forces you to leave this context 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment