Moving from Sublime to VIM

Like many developers starting out, I used Sublime Text as one of my first text editors. It’s one of the most popular free editors that is also beginner friendly. It’s packed with features and has a mature suite of productivity plugins for tons of customization. When I joined a commercial team last year, I saw that almost everyone used VIM. And after pairing with some of them, I saw how fast and efficiently you could code with VIM.

I was shocked. I was intrigued.

I needed to learn.

VIM

Looking at the two websites, they are extremely different. Sublime is a like a sexy Notepad++. If you look at the VIM site, well… how would you put it? It’s a pretty fugly site. I consider VIM quite utilitarian at its core but once you use it, you understand it’s elegance. Every key stroke is about pure efficiency, a system built to reach every spot you need through stroke combinations. All this is done without ever leaving the home row. That’s the beauty of VIM.

A few other things to note about VIM is that it comes free and built into the OSX terminal; Yep, a portable text editor wherever you go! Once you customize it to your desires, you’re ready for anything.

So back to the original intent of this post. What’s the best way to learn VIM after getting used to an editor like Sublime? One good way to get started is with the built-in VIM tutorial. Type in vimtutor in the terminal and you’re off to the races.

After you have a taste of the basics, you’ll probably feel like you still have no idea how to be productive during your day-to-day work.

Don’t worry.

VIM does have a steep learning curve so it takes awhile to adjust. But once you do, you will ever wonder how you ever used anything else.

I would recommend learning the basics of movement, inserting and deletion during the first few days. Don’t learn every inserting and deleting mode. Learn maybe two basic ones to get started. Once you get used to that, start adding a few shortcuts each day as you feel the pain of slow insertion and deletion. It’s easy to get overwhelmed by looking at a VIM cheat sheet. Don’t try to learn it all at once. Again, get used to the basics and you will start to notice strokes that feel slow. Chances are ,there is a faster way to achieve the same result. That’s the time to pick up a new shortcut or customization.

The same goes for plugins. There are many .vimrc configurations on the internet that can be copied, but if you don’t know what they do, they won’t be useful. It’s best to add some of the essentials (here’s some ideas on where to start) and add plugins as you look for increased productivity.

If you get hooked on VIM, it won’t be long before you’re a VIM advocate. Hey, maybe you’ll even become one of those VIM ninjas that inspire future generations.

Happy coding!

-TUS

Don’t miss a post by following on the right hand side of the blog or via Twitter @chestertus