Updates in Vimland 2014

Another year has passed thus it’s time for the third installment of the series on my Vim configuration. The main motto of this year has been “reduction and time saving”.

NeoBundle becomes Plug and Airline becomes Lightline

I know, I know, yet another plugin manager. This time it’s vim-plug, which has all the features of NeoBundle has but additionally can install plugins in parallel. This a huge timesaver when installing or updating some twenty plugins. This requires +ruby support until we will finally see NeoVim replacing Bram Moolenaar’s original Vim.

In the process of slimming down my .vimrc and the overall appearance of a typical Vim session (“less is more”), I replaced Airline with Lightline. I removed the majority of additional information except for the color-coded mode, filename, modified flag and current position. Pure and simple.

Improved vim-tex-fold

I already wrote about the plugin that folds parts of a TeX document. Since the initial release it has seen some major improvements with some input given by Daniel Andreasen. The plugin should be a bit faster (probably not noticeable) and more flexible by allowing to fold custom environments. Give it a shot, if you edit LaTeX documents regularly and do not want to use one of the larger LaTeX toolboxes.

Semi-asynchronous execution

Calling out to external programs and libraries in Vim is synchronous and blocks any user input. This becomes a big problem when dealing with long-running processes such as compiling program sources or TeX documents with Make. NeoVim’s main objective is to lift this limitation by replacing Vim’s synchronous main loop by an event-driven loop. In the mean time vim-dispatch fills that role by talking to a surrounding tmux session. Thus, whenever you run :Make it will start a new instance on the bottom while allowing you to continue editing the actual text. This has become a major time saver in the past.

Honorary plugin mentions

Some more plugins that made it into my .vimrc:

  • Goyo is a whiteroom-like plugin that turns off any distracting elements and adds margins to neatly center the text in the middle. Great for writing non-code.
  • vim-vinegar by the venerable Tim Pope is a file opener that complements CtrlP rather nicely. You type a dash - in normal mode which will take you to a file list that you can navigate with regular Vi navigation. That comes in especially handy for files that “neighbour” the current one.
  • vim-wordy uses a huge list of words, phrases and oddities that indicate poor writing. I only use it occasionally because it tends to nag a bit too much for my taste. But you should definitely read the background sources which give a nice overview what to avoid when writing prose.


Probably the biggest change has been remapping the <Leader> prefix from the comma key to the space bar. It’s a lot easier now to hit the space bar with my thumb instead of finding the comma key with my index finger.

Another big timesaver was mapping the command sequence 1z= to <Leader>ss. If spell checking is enabled it will replace a wrong word under the cursor by the first suggestion of the correction list.