Vim vs Neovim: what differs and which to choose
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- Vim / Neovim
- compares
- Vim vs Neovim
Neovim started in 2014 as a fork of Vim. It keeps Vim's modal editing and most of its commands, but adds Lua as a first-class configuration and plugin language, a built-in LSP client, Tree-sitter-based highlighting, an embedded terminal and more modern defaults. Vim focuses on stability and compatibility, and has its own new script language, Vim9 script. Choose Neovim for an IDE-like setup built from Lua plugins; choose Vim when you want what is installed on every server, or rely on Vim9 script.
Criterion by criterion
| Criterion | Vim | Neovim |
|---|---|---|
| Config file | ~/.vimrc (or ~/.vim/vimrc) | ~/.config/nvim/init.lua or init.vim |
| Scripting | Vimscript and Vim9 script | Vimscript and Lua (no Vim9 script) |
| Language servers | through plugins (vim-lsp, coc.nvim, yegappan/lsp) | built-in client (vim.lsp) |
| Syntax highlighting | regex-based syntax files | syntax files plus Tree-sitter |
| Defaults | vi-compatible unless a vimrc exists; defaults.vim adds some | modern defaults: hidden, incsearch, mouse, filetype on … |
| Installed by default | on most Linux distributions and macOS (vi or vim) | usually installed separately |
| GUI | gVim | external front ends (Neovide and others) |
Moving a vimrc to Neovim
-- keep using an existing vimrc while you migrate
vim.cmd("source ~/.vimrc")
vim.opt.number = true
vim.keymap.set("n", "<leader>w", ":w<CR>")Most Vimscript plugins work in both. Plugins written in Lua, and those built on vim.lsp or Tree-sitter, work only in Neovim; plugins written in Vim9 script work only in Vim.
Sources
Related pages
commands · vimVim search and replace: :%s/old/new/g and its flagsReplace text in Vim with :%s/old/new/g; add c to confirm each change and i to ignore case, limit it to a range or a selection, and match whole words only.errors · vimVim: E37: No write since last change (add ! to override)Vim shows E37: No write since last change when you quit or open another file with unsaved edits. Save with :wq, discard with :q!, or set the hidden option.config · vscodeVS Code format on save: editor.formatOnSave and default formattersTurn on editor.formatOnSave in VS Code, choose the formatter for each language with editor.defaultFormatter, and share the setup in .vscode/settings.json.