Vim vs Neovim

If you're reading this book, you may be wondering whether to invest your time in Vim, Neovim, or both. It's a fair question -- they share deep roots and most core editing concepts, but they've diverged in meaningful ways over the past decade. This chapter lays out the differences honestly so you can make an informed choice that fits your workflow and priorities.

Neovim started as a fork of Vim in 2014 with the goal of modernizing the codebase and adding features the community wanted. Today, both editors continue to evolve, but Neovim has become the choice for most new Vim users.

What you'll learn in this chapter:

  • Understand the historical relationship between Vim and Neovim and how they diverged

  • Compare built-in features, defaults, and plugin ecosystems between the two editors

  • Identify Neovim-exclusive capabilities like Lua API, floating windows, and inccommand

  • Decide which editor best fits your workflow and priorities

  • Follow a step-by-step migration path from Vim to Neovim

History

  • 1991: Vim 1.0 released by Bram Moolenaar (based on vi from 1976)

  • 2014: Neovim fork started by Thiago de Arruda

  • 2023: Bram Moolenaar passed away; the Vim community continues his legacy

  • Today: Both editors are actively maintained with different philosophies

Key Differences

Run :h vim-differences in Neovim for the complete official list.

Built-in Features

Feature
Vim
Neovim

Lua scripting

Plugin required

Built-in (first-class)

LSP client

Plugin required (coc.nvim)

Built-in (vim.lsp)

Treesitter

Not available

Built-in

Terminal emulator

Basic (:terminal)

Full-featured (:terminal)

Floating windows

Limited

Full support

Async job control

job_start()

vim.loop (libuv)

Clipboard

Requires +clipboard compile flag

Auto-detected

Defaults

Conservative

Sensible defaults

Remote plugins

Not available

RPC-based architecture

Inccommand

Not available

Live preview of :s substitutions

Defaults

Neovim ships with better defaults. Many options that require configuration in Vim are already set in Neovim:

Tim Pope's vim-sensiblearrow-up-right plugin was created to give Vim these defaults. Neovim users don't need it.

Configuration

For a detailed guide on setting up either editor, see (see Configuring Vim & Neovim).

Aspect
Vim
Neovim

Config file

~/.vimrc

~/.config/nvim/init.lua (or init.vim)

Config language

Vimscript

Lua (preferred) or Vimscript

Plugin ecosystem

Vimscript-based

Lua-based (modern plugins)

Package manager

vim-plug, Vundle

lazy.nvim, packer.nvim (deprecated)

XDG compliance

No

Yes (~/.config/nvim, ~/.local/share/nvim)

Plugin Ecosystem

The modern plugin ecosystem is largely Neovim-specific:

Category
Vim
Neovim

Completion

coc.nvim, YouCompleteMe

nvim-cmp + LSP

Fuzzy finder

fzf.vim, ctrlp

telescope.nvim

Git

vim-fugitive

fugitive + gitsigns + neogit

File explorer

NERDTree, netrw

neo-tree, oil.nvim

Status line

vim-airline

lualine.nvim

Syntax

vim-polyglot

nvim-treesitter

Debugging

vimspector

nvim-dap

Surround

vim-surround

mini.surround, nvim-surround

Most Vim plugins still work in Neovim, but not vice versa.

Neovim-Exclusive Features

Lua API

Neovim's Lua API is covered in depth in (see Neovim and Lua).

Floating Windows

Inccommand (Live Substitution Preview)

As you type :%s/old/new/g, Neovim shows the changes live.

Built-in LSP

No plugins needed for basic LSP -- just configure it directly (see LSP for a full setup guide):

Neovim-Specific Settings (Vimscript)

If you maintain a shared config that works in both Vim and Neovim, use has("nvim") to guard Neovim-specific settings:

Tip: inccommand=nosplit shows substitution changes live as you type. Use inccommand=split to also show off-screen changes in a preview window.

When to Use Vim vs Neovim

Choose Vim if:

  • You need it on systems where only Vim is available (many servers)

  • You have a well-established Vimscript configuration

  • You prefer maximum stability and conservatism

  • You work on systems with very old software

Choose Neovim if:

  • You want modern IDE-like features (LSP, Treesitter, DAP)

  • You prefer Lua for configuration

  • You want the latest plugin ecosystem

  • You're starting fresh with Vim-style editing

  • You want better terminal integration

  • You want floating windows and modern UI elements

Migration Checklist

If you're moving from Vim to Neovim:

  1. Install Neovim: brew install neovim or sudo apt install neovim

  2. Copy config: cp ~/.vimrc ~/.config/nvim/init.vim (works as-is!)

  3. Replace vim-plug with lazy.nvim

  4. Replace coc.nvim with native LSP (nvim-lspconfig + mason.nvim)

  5. Replace regex highlighting with Treesitter

  6. Replace fzf.vim with Telescope

  7. Gradually convert init.vim to init.lua

  8. Explore Neovim-specific plugins

Tip: You don't have to migrate everything at once. Neovim is fully compatible with Vimscript, so you can migrate gradually.

Summary

Vim and Neovim share the same editing philosophy and core keybindings, but they have diverged significantly in their approach to extensibility and modern development features. Neovim's built-in LSP client, Treesitter integration, Lua scripting, and sensible defaults make it the stronger choice for new users and those who want IDE-like capabilities. Vim remains a reliable, stable editor that is available on virtually every Unix system and continues to serve users who value its conservative approach.

Key takeaways:

  • Neovim ships with sensible defaults that Vim requires plugins or manual configuration to match.

  • The modern plugin ecosystem is overwhelmingly Neovim-focused, built on Lua rather than Vimscript.

  • Built-in LSP, Treesitter, and floating windows give Neovim IDE-level features without external dependencies.

  • Migration from Vim to Neovim can be done gradually -- your existing Vimscript configuration works in Neovim without changes.

Exercises

  1. Compare defaults — Open the same file in both Vim (vim file.txt) and Neovim (nvim file.txt). Check the values of hlsearch, incsearch, wildmenu, and laststatus in each with :set hlsearch?. Note which options are already enabled by default in Neovim but not in Vim (see Configuring Vim & Neovim).

  2. Try inccommand — In Neovim, set :set inccommand=split. Open a file with several occurrences of a word, then type :%s/word/replacement/g slowly and observe the live preview. Try the same substitution command in Vim and note the difference in feedback.

  3. Compare terminal emulators — Open a terminal in Vim (:terminal) and in Neovim (:terminal). In each, try running a command like ls, then try switching back to normal mode. Note the different key sequences and behavior.

  4. Floating windows vs splits — In Neovim, create a floating window using the Lua API. Then in Vim, try to achieve a similar popup effect. Compare the results and note the API differences (see Neovim and Lua).

Last updated

Was this helpful?