I’ve recently moved my Vim configuration from targeting classical Vim
to the fork of it dubbed Neovim. Personally, if you’ve used Vim for some
time, I recommend installing and firing up
nvim to try it out. It comes with a
lot of saner defaults, a terminal emulator within itself and job
control support. This might all mean nothing but consider the following
abilities of these:
neomake: Allows asynchronous checking of your files.
vim-test: Allows for testing your code immediately whilst in Vim.
- every thing in this post.
Those two plugins allow me to close at least one pane in tmux, something that’s always appreciated . Another thing that I’ve been meaning to do was consolidating a lot of the options I had for Vim into a single file. When I used classical Vim, it looked something like this:
I took advantage of Vim’s plugin system to load in more options for non-core Vim functionality1. At that time, I also used 72 plugins. It was a lot faster than you’d believe.
Over time though, the combined functionality of these plugins and modal editing began to clash. Things like Syntastic freezing whenever I saved a file or even my own plugin becoming more slow to use in neovim prompted my transition to the application.
Actually Moving to Neovim
The first thing I did was delete everything. This is so much easier to do
when you have your configuration versioned so you can fetch what you need and
nothing more. Working on a clean slate for neovim also gave me a few hours to
understand how different it would be compared to Vim out of the box; an
experience that’s led to some harsh times for new comers. An example of this
would be the
backspace option. By default in neovim, it’s currently
:set backspace=indent,eol,start, which is what most people have defined in
The very next thing I did was look for a plugin manager. As we’ve established , I’m a bit of a plugin junkie, indulging in my polyglot behavior so finding one was at the top of my list. There’s quite a few tools to use like Pathogen, Vundle, NeoBundle, VAM and the likes. I ended up using vim-plug. It’s a plug-n-play kind of plugin which allows for it to be fixed to a specific version in my sources. It also comes with a snapshotting command so that once I feel comfortable with the interoperability of the plugins I have currently, I can lock them into place . I mean, look at it.
Start up time for neovim is below ten milliseconds with vim-plug and all of my plugins, currently over ~50 or so (it’s inevitable).
This is a bit of a false reading; this is without
filetype plugin indent on
set. With that set, the numbers spiked up a bit but not to a show-stopping rate:
Nearly a half-second extra. Lawd . We both know why this happened though.
Now, adding plugins for neovim was a bit easier now that I had vim-plug in tow. The other angle to be considered here is what plugins took advantage of the asynchronous nature of neovim. I was looking to see if support for neovim was added to Syntastic but no such mention was found . This led me to move to neomake, an alternative to Syntastic but runs asynchronously in Vim. The list of makers (or checkers) for neomake is growing but as with all good things, had there been a way to merge both Syntastic and neomake together, it would benefited users a lot for not needing to transition over. My old Syntastic configuration looked a bit like this:
One can make the argument that I turned on a lot of the checkers in Syntastic, potentially leading to it slowing down. To that, I’d say:
I NEEDZ THEM! *cough*
It felt a bit faster though I have to invoke an actual time test. ↩