This post was authored by guest author Mark Sanborn. Find out more below.
When it comes to productivity I can’t think of any application that has saved more time and frustration than Vim. Vim is the ultimate productivity tool for programmers. Most users of Vim that I know that have spent the time to learn it absolutely love it and couldn’t imagine a world without it. My only regret with Vim is not learning it sooner.
So what is Vim?
Vim is a modal text editor that is highly configurable, efficient, and lightweight. Some people refer to it as the programmer’s text editor because it has a plethora of features that make programming easier, although it could be used for other things like writing email and editing config files.
What makes Vim especially great is the shortcuts, commands, and the blistering speed at which you can edit text files since Vim has all the common editing tasks mapped to single keys on or near the home row on your keyboard.
Sounds great… but there is a catch:
Vim isn’t an editor designed to hold its users’ hands. It is a tool, the use of which must be learned.
Easing the learning curve
Vim is known for having a steep learning curve. I think Vim has this reputation because people tend to want to learn all of the features right away and quickly become overwhelmed.
Vim is a lot like Adobe Photoshop, you can learn just a few simple techniques in Photoshop that can make a world of a difference in the images you can create and ways you can manipulate them. Yet it may take you a lifetime to master all the functions Photoshop has to offer. Vim is the same way. You can learn only a few shortcuts and commands that will completely change the way you do text editing but may take years to learn them all (not that you would need to).
The great thing about Vim is everyone uses it differently. I have my favorite shortcuts that I use every day. Someone else might have a different set they use depending on what types of files they generally edit. Once you learn a few basics and get comfortable with the shortcuts and commands that you use every day you can learn another to increase your productivity.
Getting Started
I suggest going through vimtutor once right now and again after you have played around with Vim for a while. You can access vimtutor by typing in the command, ‘vimtutor’ for Linux users and by running vimtutor.bat in your Vim folder for Windows users.
Vimtutor has all the commands and how to use them as well as practice sections for all your basic editing needs. Don’t worry if you don’t remember all the commands when going through the vimtutor for the first time; however, it is important to do the exercises at the end of each section so you can get used to the way Vim works. It should only take about a half hour to make it through your first run through the tutorial.
You might consider bookmarking this article for your reference and checking out vimtutor now.
Making Vim Work for You
After using Vim for a while now I have a good idea which commands I use most often when doing web development, programming, and configuration editing. We will use this experience to look at different ways Vim can improve your programming and make it faster while trying not to overwhelm you with too many new commands. Grab a few of these, use them, and add more when you feel comfortable.
Continue reading →