ToolsWorkflowNeovim

How Neovim changed the way I build software

JSJatin ShrivastavJun 20267 min read
TL;DR

Neovim was hard in the start, but after some time editing became invisible. When moving and changing code is almost free, you stay inside the problem and the whole work goes faster.

For many years I never thought much about my editor. It was just a thing where I type. I used it, that's all. Then I switched to Neovim, half because I was curious and half because I saw other people using it and I felt I am missing something. I thought maybe few weeks of pain and then small benefit. But what happened was bigger than that. It slowly changed how I do my work. The speed is real, but it did not come from where I was thinking it will come.

First weeks are painful, this is normal

I want to say this clearly, because most people skip this part: in the start I was slower. A lot slower. I was forgetting the motions, I was going into wrong mode, and I was searching on Google how to do simple things that before I was doing without thinking.

What helped me was to see this as a one time cost. I was not learning shortcuts. I was learning a small language to talk about text — verbs like change and delete, and nouns like word, paragraph, inside the brackets. After these start to combine in your head, you stop remembering commands and you start making sentences.

textci"   change inside quotes
dap   delete a paragraph
ggVG  select the whole file

Alone these are nothing special. The real thing is they join together, and after they join together you stop thinking about them completely.

Editing stopped fighting with my thinking

This is the real change for me. In my old setup, every edit which is not trivial had one small pause inside it — take the mouse, find the place, drag to select, come back to keyboard. Each pause is small. But they come exactly when you are in middle of a thought, and they make you lose the thread.

The speed is not in the keys. It is in not leaving the place in your head where the problem is living.

When moving and changing text is costing almost nothing, the editor stops being a thing you operate and becomes like invisible. The attention I saved, I put it on the problem and not on the mechanics of typing it. This is the part that grows over time.

The terminal stopped being a different room

Living inside a terminal editor pulled all my other work closer also. Tests, git, logs, grep, a quick script — everything is just one split away, in the same place where my hands already are. I stopped jumping between the editor window and ten other apps, and the line between "writing code" and "running it" mostly disappeared.

It also made my setup portable in a way I did not expect. The same config comes with me to any machine I SSH into. It is not stuck to one GUI on one laptop now.

What I actually want to say

I am not going to say Neovim makes everybody faster. Many very good engineers will never use it, and the learning curve is a real cost. You should only pay it if you are spending most of your day inside text.

But for me the benefit was not typing speed. It was that the tool went out of my way. The distance between I decide to make a change and the change is done became almost nothing, and when this distance is small you stay in flow for longer and you finish more in one sitting. That is the whole point. Everything else is just configuration.

Recent writing

Writing