Switching to NeoVim

I've been planning on trying out neovim again, but couldn't remember what the issue was last time I tried it, so I tried quickly again and found back:

Powerline isn't compatible with it.

And the previous time I wasn't willing to play too much with my configuration so I didn't try anymore than that.

This weekend I decided to take some time and try to get a working setup that would suit me and would work with neovim.

So here was the plan of things I wanted to do about this, pretty simple:

Gitgutter installation was easy as pie, and I actually do like it, so that was one thing done, and working as expected.

Replacing powerline by airline was pretty easy, and I do find it pretty neat. I'm pretty sure most of the features are possible to get in powerline too, but I never saw them, among other things:

  • hunk status, which compliments nicely gitgutter
  • ycm integration
  • smart tabs, showing tabs like with buffers when there is only one opened tab
  • whitespaces warnings

So, just with that I was pretty happy to have given it some time, it does feel like it will improve my workflow a bit.

Finally switching to neovim, it went pretty well at first, but I ended up falling on an issue pretty quickly. I use vim-man both inside vim, and as a manpager in my shell, and this doesn't work in neovim.

There is a fork for neovim called nvim-vim but for some reason it doesn't work, and I didn't dare to go deeper at first, and while I was typing this post I actually felt like I should at least check again what the issue was, and that's when I realized that the built :Man in neovim was apparently quite enough for me, so I removed the plugin, and tweaked my configuration accordingly:

  • took back the binding to search for options from vim-man
  • I noticed I had quite a lot of occurences of vim in my .zshrc aliases, so I replaced then by $EDITOR so I could do the switch more easily for my tests
  • I replaced the MANPAGER variable by the one suggested in the neovim help.

And that's it, my setup seems to be pretty much seamlessly upgraded, only time will tell if I'll stick to neovim now.

Last, I decided to check a bit the memory consumption, neovim claims to have a lot less code, and I wanted to check how that reflects on the memory footprint in the end. Given it is newer and fancier, I was kinda expecting that even with less code, it will end up being bigger, but I was wrong!

empty 200 files
vim 40MB 44MB
nvim 15MB 22MB

So yeah, the increase seems to be bigger for the same opened files, but it doesn't seem crazy, even with that many files opened.

So, all in all, pretty good result for now, we'll see how it goes when in real work environement.