Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

switching to neovim without making it a personality

A gradual move from Vim to Neovim, what actually changed day to day, and the handful of config differences that made it stick rather than a wholesale rewrite of my setup.

A terminal running Neovim with a split window

I've used Vim for long enough that my fingers know it better than I do. So moving to Neovim was never going to be a dramatic switch, and I deliberately didn't make it one. I copied my .vimrc across, fixed the half-dozen things that complained, and carried on. That's the whole pitch of this post, really: you can move to Neovim without rebuilding your editing life, and the bits that are genuinely better will reveal themselves slowly. Which is the opposite of how these things usually get written up.

why bother at all

Honest answer: the terminal experience. The thing that finally got me to move was the built-in terminal emulator. I'd been running tmux splits next to Vim for years, popping out to run tests or tail a log, and :terminal collapses that into one tool. Open a split, run your tests in it, jump back to your code, all without leaving the editor or learning a second prefix key. It's not revolutionary. It just removed a small daily friction I'd stopped noticing, and once it was gone I didn't want it back.

The second reason was less concrete and more about where the energy was. By mid-2017 the interesting plugin work and the asynchronous job support felt like they were happening on the Neovim side. Vim 8 had landed its own jobs and channels by then, so it's not as if mainline Vim stood still, but Neovim's jobstart() and the plugins built on it were where I kept ending up when I went looking for "run this linter in the background without freezing the editor".

A code editor split with a terminal pane running tests

the migration, such as it was

Neovim doesn't read ~/.vimrc. It reads ~/.config/nvim/init.vim, following the XDG layout, which I prefer anyway. The path the docs nudge you toward is a small shim that sources your existing config, so you keep one source of truth while you're still hopping between the two editors:

set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc

That got me ninety percent of the way in about five minutes. The breakages were the usual suspects: a couple of options that Neovim sets sensibly by default and therefore complains if you set again, and one plugin doing terminal-detection that didn't recognise nvim. Nothing that took more than a quick search.

A few defaults are just better out of the box and I deleted the lines that used to set them by hand. nocompatible is implied, you'll never type it again. incsearch, autoindent, sane backspace behaviour, all on already. Persistent undo and a proper default undodir meant I could bin a chunk of boilerplate I'd been carrying since about 2009. There's a quiet pleasure in a config file getting shorter.

The one thing worth doing deliberately rather than copying blindly is async linting. If you're on a plugin that supports it, this is where Neovim actually changes your day. Running the linter as a background job means you keep typing while it works, and the errors appear in the gutter a beat later instead of locking the editor for half a second every save. That half-second adds up over a day in a way you only appreciate once it's gone.

what I left alone

I want to be clear about what I didn't do, because the temptation when you switch editors is to rebuild everything, and that's how you lose a weekend and your muscle memory in one go.

I kept my plugin manager. I kept my keybindings, all of them, every awkward leader mapping I've accreted over the years. I kept my colourscheme. The goal was a new engine under the same car, not a new car. The moment you start re-deciding settled questions ("should I switch plugin managers while I'm here, should I rethink my leader key") you turn a five-minute move into a project, and the project is the thing that makes people give up and go back.

A neovim config file open beside a terminal

the honest verdict

A fortnight in, would I tell a fellow Vim user to switch? Only if something's actually pulling them. If you're happy in Vim 8 and you don't feel the friction I felt, there's no urgency and anyone telling you otherwise is selling something. The two are close enough day to day that you'll forget which one you're in, which is exactly the compliment I want to pay it.

But if you've been juggling tmux and the editor for your terminal needs, or you keep hitting that little async-linting wall, the move is cheap and the path is well-trodden. Copy your config, fix the handful of complaints, and resist every urge to "tidy things up while you're in there". Slowly is the right speed. The better bits arrive on their own.