After a few years of professional experience almost every developer
will need (or at least encounter) Vim. There is nothing quite as frustrating as
opening a “text editor” and not being able to edit text without accidentally
a. Why is such an important tool so unapproachable?
I’d posit three primary reasons:
- It’s complicated as $h#t. Not much to be done about that; you just have to crank on Vim Adventures for a while. It doesn’t hurt to read a few 101 Guides as well. Most powerful tools have a learning curve; developers understand that better than most.
- Community Angst. Just Google Vim vs Emacs or Sublime vs Vim if you
aren’t already familiar with the elitist dialogue and pyrrhic arguments that eclipse
the merits of these tool sets and leave would-be learners somewhere between analysis
paralysis and trepidation. Relax people, these editors aren’t going
anywhere. Start with one and if you don’t like it, switch. At least give Vim
a chance if you haven’t already; your life will be easier
sshinto your next client’s server.
- Unfriendly Defaults. More on this below.
In my experience, very few people use Vim without heavy customization. Why?
Because out of the box you get virtually nothing but an extremely unintuitive
editor. Think learning Rails without boiler plate code or scaffolding to get you
started. Beginners are encouraged to add things like
set number to their
.vimrc file. Are there a lot of people running around editing files without
line numbers? No. Making a new Vim user add things to a dotfile to achieve
obvious default behaviors seems inane, and valid grounds for premature Vim
I didn’t need these “dotfile” shenanigans with Sublime. Btw, why doesn’t my cursor work any more?
I think Vim beginners have enough to worry about without trolling Vim
Tips every time they want to do something obvious. And I wouldn’t
limit that to
.vimrc customization. The magic of Vim happens in the amazing wealth of
plugins, like running specific RSpec tests in two keystrokes without leaving the
editor. And project navigation is truly unbearable
without something like ctrlp.
It seems to me that beginners should be weaned on a default set
of “customizations” instead of encouraged to learn “normal” behavior
while accumulating their own custom settings through iterative bouts
of hair pulling. And for that matter, do we all need to add
set number and
set backspace=2 to our
.vimrc? It doesn’t seem terribly DRY as a community.
How about a little standardization?
Beginners should be introduced to Vim with a standardized set of dotfiles and plugins; they will start to see the silver lining earlier in an otherwise harrowing learning curve. But I wouldn’t mind seeing even broader adoption of standardized dotfiles, with individual personalization kept in local overrides. Besides improving the learning curve this standard dotfile/plugin combination makes it easier to pair/collaborate, and to pick out useful improvements while rummaging someone else’s setup since you don’t have to sort through the same-old “best practice” chaff.
There are some robust contenders for a “standard”, including my favorite dotfile set by thoughtbot and the somewhat heavy-handed YADR (even more here). My own setup uses thoughtbot’s as a baseline, so I can focus more on my local overrides and less on what should be default behaviors.