Introduction
Most editors are something you click around in. Neovim is something you speak to. Instead of reaching for the mouse, you describe what you want ("delete this word," "change everything inside these quotes") in a few keystrokes. It looks strange for the first week and feels like a superpower after a month, and because it runs in a terminal, it works just as well over SSH on a server as on your laptop.
The Problem Neovim Solves
Editing text is most of what a programmer does, and ordinary editors make it slower than it needs to be:
- Constant hand travel between keyboard and mouse
- Repetitive actions like arrow-keying across a line to fix one word
- Heavy, slow tools that struggle on a remote server or a small VPS
- Locked-in setups where your editor, shortcuts, and plugins change from one machine to the next
When you edit configuration files on a server over SSH, you often have nothing but a terminal. You want an editor that's fast, capable, and already feels like home.
The Neovim Approach
Neovim is a modern fork of Vim, the classic modal editor. It keeps Vim's core idea and adds a cleaner codebase, a built-in Lua scripting language, and first-class support for modern tooling like language servers.
Core idea: Separate typing text from manipulating text. Different modes give the same keys different jobs, so you can edit without leaving the home row.
The Modes
- Normal mode โ The default. Keys are commands: move, delete, copy, and so on.
- Insert mode โ Keys type text, as in any other editor. Enter with
i, leave withEsc. - Visual mode โ Select text with
v, then act on the selection. - Command mode โ Press
:to run commands like:w(save) or:q(quit).
Simple Example
nvim notes.txt
Press i, type something, press Esc, then type :wq and Enter to save and quit. That's the minimum for survival, and everything else builds on it.
Editing as a Language
Neovim's commands combine like a sentence: an action plus a motion or object.
| Keys | Meaning |
|---|---|
dw |
delete a word |
d$ |
delete to the end of the line |
ciw |
change inside the word under the cursor |
ci" |
change inside the double quotes |
yy |
yank (copy) the current line |
p |
paste |
u / Ctrl-r |
Undo / redo |
. |
Repeat the last change |
Add movement keys such as h j k l (left, down, up, right), w and b (word forward and back), gg and G (top and bottom of the file), and /text (search), and you can do in a few keystrokes what takes dozens of mouse actions elsewhere.
Configuring Neovim with Lua
Neovim reads ~/.config/nvim/init.lua at startup. A small, readable config is enough to get started:
-- ~/.config/nvim/init.lua
vim.g.mapleader = " "
local opt = vim.opt
opt.number = true -- line numbers
opt.relativenumber = true -- distances from the cursor, useful for motions
opt.expandtab = true -- spaces instead of tabs
opt.shiftwidth = 4 -- indent size
opt.ignorecase = true -- case-insensitive search...
opt.smartcase = true -- ...unless you type a capital
opt.clipboard = "unnamedplus" -- share the system clipboard
-- Save with <Space>w
vim.keymap.set("n", "<leader>w", "<cmd>write<cr>")
What's happening:
vim.optsets editor optionsvim.keymap.setbinds keys to actions- The whole file is plain Lua, so it's easy to read and easy to grow
Plugins and Language Support
Plugins are managed by a plugin manager, with lazy.nvim being a popular choice. Neovim also has a built-in LSP client (Language Server Protocol), which brings go-to-definition, diagnostics, and autocompletion hooks from the same language servers that power big IDEs. In Neovim 0.11 or newer, with the nvim-lspconfig plugin installed, enabling one is a single line:
vim.lsp.enable("pyright") -- Python language server
You install the language server itself separately (for pyright, through npm or pip). Follow each plugin's own README for the details, since they evolve quickly.
Why This Matters
-
Speed โ Once the commands are in your fingers, editing is faster and less tiring.
-
Works anywhere โ The same editor runs on your laptop, a Raspberry Pi, and a bare VPS over SSH.
-
Light on resources โ It starts instantly and uses very little memory.
-
Yours to shape โ Lua configuration lets you build exactly the editor you want, and nothing you don't.
-
A durable skill โ Vim-style editing is available in almost every IDE, shell, and browser extension, so the skill pays off everywhere.
Real-World Use Cases
- Editing server config โ Nginx, systemd units, and
sshd_config, right where they live - Writing code โ With LSP, syntax highlighting, and plugins, it can serve as a full development environment
- Writing Markdown โ Like the posts for this blog
- Quick edits and Git messages โ Instant startup beats opening a heavy application
- Working inside tmux โ A terminal editor in a persistent session is a comfortable remote workflow
Getting Started
-
Install it. On Debian,
sudo apt install neovimworks, though the packaged version may lag behind. For the latest release, use the official builds from the Neovim project. -
Run the built-in tutorial. Start
nvimand type:Tutor. It takes about half an hour and is the best way to learn. -
Use it for real work immediately, even if you're slow at first.
-
Create
~/.config/nvim/init.luawith a handful of options like the example above. -
Add plugins one at a time, only when you feel a specific need. A config you understand beats a huge one you copied.
Know the Limits
- The learning curve is real. Expect to feel clumsy for a week or two.
- Configuration is a rabbit hole. It's easy to spend more time tweaking your editor than using it.
- Plugin setups change. Copy-pasted configs age quickly, so keep yours small.
- It's not for everyone. If a graphical editor makes you productive, that's a perfectly good choice.
The Philosophy
Neovim is built on the idea that your editor is a tool you practice with, not a product you operate. The investment up front is learning a small language of motions. The return is a lifetime of editing that feels more like thinking than typing.
Start with :Tutor, a tiny init.lua, and a real project. Let your config grow only when your own frustration tells you what to add.
This post is part of a series on the tools behind this blog: Django, HTMX, Tailwind CSS, PostgreSQL, SQLite, Docker, Debian on a VPS, tmux, SSH, and now Neovim. Posts are authored in the Django admin as Markdown and rendered to HTML on save.