What is Vim and Why use Vim?
First, a disclaimer: I’m, by no means, a Vim expert. In fact, I’m in the same newbie boat as most of you except I’ve recently started using Vim more seriously at work. For those of you who are still reading, you probably have an idea of what Vim is but in case you don’t, here’s a quick description.
Vim is just a text editor. That’s it. If you’re used to using Notepad (Windows), Sublime Text (Windows / Mac), Atom (Windows / Mac), Nano (Linux), or any text editor, Vim is just another program that allows you to write and edit text.
So what makes Vim special?
Compared to other text editors, 2 aspects make Vim stand out:
This is the big one. Vim is all about efficiency. And there’s a couple of angles from which it approaches efficiency.
Core to Vim’s belief is that most people spend more time editing existing text than writing new text. This is especially true for software engineers who are often tasked with enhancing and maintaining existing code. Even if you’re not a software engineer, think back to when you were writing essays in college — yes, it probably took you a long time to reach the finished product but that’s because you revised it along the way and proofread it 100 times after finishing your initial draft.
Vim allows you to be efficient by forcing you to only use the keyboard (yes, that means no more mouse!) and then giving you the ability to use existing keyboard shortcuts as well as customize and create new ones for completing repetitive tasks quickly. I won’t go into detail about configuring your .vimrc file in this post, but essentially, your .vimrc file is just a plain old text file that Vim processes each time its loaded, and it contains all the shortcuts and configurations to make your Vim editor unique to you. This ability to customize Vim to suit your typing needs is what ultimately lets Vim shred through text at the speed of thought!
This is also a pretty cool aspect of Vim, which is that it’s everywhere. It’s available on basically every major platform you can think of. Whether you’re using a Mac, Windows, or some Linux distribution, Vim’s got you covered. In particular, if your day to day work involves working in the ssh’ed terminal sessions, Vim is your only text editor available.
Why doesn’t everyone use Vim then?
It’s true that Vim’s a powerful text editor and in this post, I haven’t even scratched the surface of what it can do yet. But like all powerful tools, there’s a learning curve to using it. Just like I don’t expect you to know how to beautifully edit photos immediately in Adobe Photoshop, I don’t expect to become an expert in Vim overnight. But the learning curve is over exaggerated — you can totally get up and running and become productive in Vim after following the vimtutor tutorial (which takes 30 minutes or so).
I’ll end this brief post by showing you how to get your first taste of Vim. For those of you using a Mac, you can follow along the screenshots I’ve attached:
On your Mac, open your terminal application.
On the shell prompt, type in “vimtutor”.
That’s it! Now go ahead and follow along the instructions and soon you’ll be able to get up and running editing and writing text in Vim!