VIM - The Efficient Dev
By Jake Robers on March 13th 2017
How do an extra 208 hours per year sound?
This would be the reward if one could improve their workflow by 10%. I bet you are thinking "Yeah.. 10%? That is being optimistic." Regardless, pairing VIM with a couple other efficient practices will assure promotion. After all, efficiency can separate the mediocre engineers from the dominators in industry.
The rewards of VIM extend beyond your work life.
At RokkinCat, most of the developers use VIM in some way, shape, or form. This ranges from using it in ATOM, to NeoVIM, to XCode, or even plain ol' vanilla VIM. VIM Mode exists in a range of editors, which provides the developer versatility. Furthermore, the predecessor Vi is in every Unix system.
A Word of Caution
Like anything, picking up something new comes with a learning curve. VIM, in particular, is fairly steep. For me, VIM took a several of weeks to recover in productivity. In fact, there were many occasions where I regressed to Sublime when I couldn't afford the decrease in productivity.
Despite this, I can ensure that it is worth the investment. Upon reaching intermediate proficiency, I started to use it everywhere -- journaling, taking notes at school, at work, and even writing this blog post. The possibilities are endless.
Where to Start?
First install VIM, and then type
vimtutor in the terminal. This will provide you with the basics.
If I were to start over, I would:
- Print off a VIM cheat sheet. Switching browser tabs can be tedious.
- Learn during a weekend. Free hackathons are great for learning a new technology while programming.
- Don't give up. Persistence is the key to success.
If you're into gaming, there are also some fun games to get your feet wet.
VIM is an extensible editor and is very easy to add novel functionality. I currently use the following plugins:
- ctrlp.vim - A fuzzy file finder
- ultisnips - Shortcuts for generating blocks of code
- vim-airline - Mostly for asthetics.
- vim-coffee-script - Coffeescript syntax highlighting
- vim-elixir - Elixir syntax highlighting
- vim-fugitive - Git integration
- vim-numbertoggle - Displays relative line numbers (good for jumping around)
- vim-pug - Pug syntax highlighting
- vim-snippets - Pairs with Ultisnips for shortcuts
- vim-surround - Surrounds text with symbols
Don't forget to add the features to your cheatsheet!
See VIMAwesome for a directory of the plugins in the VIM ecosystem.
The key to avoiding stagnation is to... well... keep learning. Once productivity stagnates, begin to recognize where inefficiencies lay. This may lead to customization of the
.vimrc, adding new plugins, or even creating your own.
If VIM isn't quick to offer a solution, it is time to look somewhere else. By no means does every solution have to consist of VIM. Explore the applications of dotfiles, code generators, automation tools, and bash scripts. When there is a will for optimization, there surly is a way.