As much as I can recommend vim since I made the switch many years ago, there’s a bunch of anti-patterns I’ve commited myself (and later saw others repeat them), which often resulted in frustration and writing off the idea, perhaps prematurely. It’s a shame to see this, because to me vim is something else and it continues to bring a lot of joy to my work even after all this time. What follows are my thoughts on some mistakes, so hopefully others reading this will avoid them :)

This post is supposed to be a short one. If it sparks some interest, I may write a few more about vim and adjacent topics.

Don’t go all-in

Switching to vim is not like going from JetBrains IDE to VSCode or Sublime Text. If you haven’t been exposed to modal editors earlier, the entry barrier is going to be tougher. You have 2 options:

a) Install vim and try to replace your former editor right away, experience initial productivity slump and find out you don’t have time nor nerves to continue.

b) Install vim and try to use it for, say, 15-30 minutes per work day. Outside of that, keep using your daily driver. Every time you notice vim lacks some feature which you find essential (e.g. file management, displaying git changes), note it down and do the reserach when you have time later. If vim clicks for you, eventually you’ll find you no longer have to switch back to your other tool.

In addition to that, as a fan of spaced repetition, I suggest trying out Shortcutfoo. This is single-handedly the best tool that helped me learn most of things I needed to survive, by spending just 5-10 minutes a day. You’ll have to pay to unlock all the lessons but a single monthly payment is a fraction of what some licenses for IDE’s cost.

Don’t get paralyzed by all the vim ‘flavors’

Vim, Neovim, Gvim, Onivim, SpaceVim, MacVim… Which one is the best? I personally prefer Neovim because:

  • it has saner defaults,
  • it feels like the original vim,
  • a lot of people argue that it brought the stalled development of vim back to life because of some great features (such as built-in terminal emulator, async that vim later caught up with),
  • it keeps innovating after many years (recent additions include Lua for writing config/plugins instead of somewhat obscure Vimscript, treesitter for incremental syntax parsing),
  • it doesn’t pretend to be a GUI application, which will make you miss out on one of the biggest perks that come with using vim - being exposed to the command line. Vim was my gateway drug to UNIX, tmux, and a whole bunch of other TUI tools,
  • it has very active community for a fork of a 30 years old project (I like to check out Neovim subreddit when I’m bored and it amazes me every time)

Not your .vimrc, not your vim

When you look for tutorials how to get started with vim, you may run into so-called starters. That is, configs which are meant to get you up and running quickly. They contain opinionated settings, plugins, and so on.

At first, it might make sense to use someone’s config. In reality, you are adding yet another set of keybindings and options to an editor which already is very unintuitive in the beginning.

What I would recommend instead, is building your own config based on sources, such as this one. Don’t blindly copy anything without understanding what it does - it will pay off later. You can use :help <keyword> for documentation of what an option does.

My .vimrc looks like unmaintainable crap (I keep it on GitHub mostly for a backup or to share some parts to those interested). What matters is that I made it myself and it just works for me. Whenever I need to tweak something, I am able to quickly navigate and modify it to my needs. Having done this incrementally, at some point I just stopped modifying it more often than once in a blue moon.

Bring just what you really need

This applies to many tools used in daily development, but it’s worth mentioning especially for vim, due to its DIY nature. If you’re used to a full-blown IDE, you could get an idea to recreate such an experience in vim. Despite it being around for a long time, the community keeps on delivering new things. I found myself going very deep down that rabbit hole of plugins and tweaks on multiple occasions. Of course, every time I did it for the sake of “productivity” until I snapped out of it. Usually after taking a step back, asking myself “do I really need this?” - it turned out I can do just fine without devicons and the latest plugins.