You open a file in Neovim, press a key to start typing, and a line disappears instead. Modal editing feels hostile for the first hour and fast for years after that. The way through that first hour is practice, and this guide puts real Neovim in your browser so you can start before you install anything.

Install Neovim, try the commands in the practice editor, then learn how modes, configuration, and plugins fit together. A searchable command reference closes the article.

What You’ll Learn

  • When Neovim is the right editor, and when another tool fits better.
  • How to install Neovim and practice its commands without leaving this page.
  • How modal editing works, so every command in the reference makes sense.
  • What Neovim adds over Vim: asynchronous plugins, Lua, a built-in LSP client, and tree-sitter.
  • Where Neovim keeps its configuration, plugins, state, and cache.
  • How to choose between vim.pack, lazy.nvim, LazyVim, and kickstart.nvim.

When to Use Neovim

Vim taught generations of developers modal editing, composable commands, and home row typing. Over time, its technical debt and complex codebase slowed updates.

Neovim began in 2014 as a Vim fork aimed at improving internal structure for faster evolution. It replaced Vim’s synchronous architecture with asynchronous, integrated Lua as a core configuration language alongside VimScript, and added a built-in LSP client. These updates created a plugin ecosystem comparable to modern editors.

Neovim preserves Vim’s speed and flexibility while adding modern workflow infrastructure. If you’re familiar with Vim, it’s a direct upgrade. Beginners get a better foundation and a developer-led ecosystem.

What Neovim Does Well

  • Editing text files with speed and precision.
  • Writing and maintaining code with LSP-powered completions, diagnostics, and navigation.
  • Managing files and directories without leaving the editor.
  • Navigating with minimal hand movement through composable keybindings.

Where Neovim Is Not the Right Tool

  • Editing binary files (use a hex editor).
  • Long-form prose (dedicated writing tools handle formatting and focus modes better).
  • Web browsing (use a browser).
  • Process management (use system monitoring tools).

Set Up Neovim

Install Neovim with your package manager, or download a release from the official Neovim website.

# macOS
brew install neovim

# Debian or Ubuntu
sudo apt install neovim

# Windows
winget install Neovim.Neovim

Check the version. The built-in plugin manager, vim.pack, needs Neovim 0.12 or later. Distribution packages often lag behind, so install the official release if yours is older.

nvim --version

Open a file with nvim notes.md, or run nvim +Tutor for Neovim’s built-in tutorial.

Practice Neovim

Prefer to practice before installing? The editor below runs real Neovim in the page on a sample file. Nothing downloads until you press Start.

The commands in the reference work in the editor, except a few that reach outside it. :checkhealth and :help runtimepath explain why they can’t run here, :!mkdir and :!touch are simulated, gx opens the link in a new browser tab, and nvim . runs in your terminal, not inside the editor. On Windows and Linux, the browser keeps Ctrl-w for closing the tab, so press the Ctrl button under the editor, then w.

Practice the commands on this page in real Neovim, right here. Nothing downloads until Start (about 2.6 MB).

<!-- Move the cursor with h j k l.
     Save and exit with :x -->
# Neovim practice file

Neovim is a modal editor. Press Esc to return to Normal mode. Then try a motion.

Delete this whole line with dd.
The word banana should go: use diw on it.
(the text in these parentheses) Empty them with dib.

function greet(name) {
  return "Hello, " + name;
}

Put the cursor on https://neovim.io (try w) and open it with gx.

## Insert text

Press i to type before the cursor, or a to type after it.
Press A to add a period at the end of this line
Press I to add a dash at the start of this line.
Press o to open a new line below this one, or O to open one above.

## Move faster

Hop forward by word with w, back with b, and to the end of a word with e.
Press $ to jump to the end of this line and 0 to jump back to the start.
Box, fox, six: from the start of this line, fx lands on the x in Box, then ; (semicolon, no Shift) jumps to fox and six.
(outer (inner) outer) With the cursor on a bracket, press % (Shift+5) to jump to its match. Press % again to jump back.
Go to the top with gg, the bottom with G, and line 31 with 31G.
Scroll down half a screen with Ctrl-d and back up with Ctrl-u.

## Change text

Fix the WRONG word. Put the cursor on it, type cw, type right, and press Esc.
Turn the cat into a bat. Put the cursor on the c and type rb.
Rewrite "the words in these quotes" with ci".
Delete to the end of a line with D, or rewrite the rest of it with C.
Make neovim read Neovim. Put the cursor on its first letter and press ~ (Shift+`) to flip the case.

## Copy, paste, undo, and repeat

Copy this line with yy, then paste it below with p or above with P.
Copy one word with yiw and paste it somewhere else with p.
Undo with u. Redo with Ctrl-r.
one two three four Delete a word with dw, then press . (period) to repeat it.
Join this line
to the next one with J.

## Counts and text objects

alpha beta gamma delta Delete three words at once with d3w.
Indent this line with >> and move it back with <<.
[the text in these brackets] Empty them with di[.
{the text in these braces} Empty them with di{.
<b>the text in this tag</b> Empty it with dit.
Delete this sentence with das. This one stays.

## Visual mode

Press v, move with w, then press d to delete what you selected.
Press V to select whole lines, then > to indent them or y to copy them.
Add a dash to each row below. Press j to go to row one, then Ctrl-v (Control, not Cmd) and jj to mark the three rows, then I to insert, type - and press Esc.
row one
row two
row three

## Search and replace

Search with / and a word, then press Enter. Press n for the next match. Try a fruit from the line below.
apple, pear, apple, plum, apple
Press * on any word to jump to the next place it appears.
Use :s/apple/kiwi/g on the fruit line to replace every apple on it.
Use :%s/apple/kiwi/g to replace every apple in the whole file.

## Marks and macros

Set a mark with ma, move away, then jump back with 'a.
Jump back to where you were with Ctrl-o and forward again with Ctrl-i.
On item one, record a macro with qa, then type I* and press Esc, press j, and press q.
Play it on the next two lines with 2@a.
item one
item two
item three

## Files and windows

Use :e notes/todo.txt to open the other practice file, and :e # to come back.
Use :split or :vsplit to split the window, and Ctrl-w w to switch windows.
Use :close to close the current window.
Use :Explore to browse the practice files.
Use :w to save, :x to save and quit, and :q! to quit without saving.
Made a mess? Press Reset sample to get this file back.

The practice editor needs JavaScript. Every command in the reference also works in Neovim on your own machine.

How Neovim Modal Editing Works

Most editors have one mode, where every key types a character. Neovim has several, and the same key does different things in each. Normal mode, where Neovim starts, turns keys into commands. Insert mode types text. Visual mode selects it. Command-line mode runs Ex commands such as :w.

flowchart LR N["Normal mode
keys are commands"] -->|"i, a, o"| I["Insert mode
keys type text"] I -->|"Esc"| N N -->|"v, V"| V["Visual mode
keys extend a selection"] V -->|"Esc"| N N -->|":"| C["Command-line mode
run :w, :q, :split"] C -->|"Enter or Esc"| N

Normal-mode commands compose like a small language: an operator, then a motion or a text object.

  • d is an operator (delete) and w is a motion (to the next word), so dw deletes to the start of the next word.
  • iw is a text object (inner word), so diw deletes the whole word under the cursor, wherever the cursor sits in it.
  • A count repeats or targets a command: 3dd deletes three lines, and 5G jumps to line 5.

When you lose track of the mode, press Esc. It returns to Normal mode, the home base every other mode leads back to.

Why Neovim’s Architecture Matters

Asynchronous architecture. Vim runs plugins synchronously by default, so a slow plugin can freeze the entire editor, like a slow car blocking a single-lane road. Neovim’s event loop, however, runs plugins in the background, preventing linting, formatting, and file searching from blocking your typing.

Lua as a configuration language. VimScript was originally meant for simple key mappings but became hard to maintain. Lua is a full programming language with proper data structures and error handling. Most modern Neovim plugins and your configs are written in Lua.

Built-in LSP client. The Language Server Protocol provides IDE features (completions, go-to-definition, rename, diagnostics) for any language with an LSP server. Vim needed external plugins like coc.nvim, but Neovim includes it built-in.

Tree-sitter integration. Traditional syntax highlighting uses regex, which fail on edge cases and can’t understand code structure. Tree-sitter builds a parse tree, providing accurate highlighting, improved code folding, and structural text objects. Unlike regex, which sees lines, tree-sitter recognizes functions, arguments, and control flow.

True color support. Neovim supports 24-bit color, so schemes appear as intended. Syntax themes rely on color contrast to show structure. When terminals reduce colors to 256 or 16, distinctions fade, and themes lose effectiveness.

Common Misconceptions

“Neovim requires weeks of configuration before it’s useful.” Five years ago, sure. Today, distributions like LazyVim provide a ready-to-use IDE in minutes. Start productive and customize later.

“Neovim is only for terminal purists.” Neovim runs within GUI apps like Neovide and integrates into VS Code, with its modal editing model being the main focus, not the terminal.

“You have to choose between Neovim and modern IDE features.” Neovim’s built-in LSP, tree-sitter, and plugin ecosystem offer completions, diagnostics, debugging, and refactoring. The features are available; the key is how you access them.

“lazy.nvim and LazyVim are the same thing.” lazy.nvim is a plugin manager that installs and loads plugins. LazyVim is a distribution, a preconfigured bundle of plugins and settings built on lazy.nvim. You can use lazy.nvim without LazyVim, but LazyVim requires lazy.nvim.

Configure Neovim

Neovim reads its configuration from a single entry point:

$HOME/.config/nvim/init.lua

Neovim consolidates settings (keybindings, plugins, options) into init.lua, making configurations portable, version-controlled, and easier to debug.

You can keep everything in one file or split it into modules:

require('my_config')

The configuration language is Lua. VimScript was suitable for simple mappings but became fragile as configurations grew complex. Lua resembles a genuine program because it is one.

Plugin management is code; no GUI for browsing or installing plugins. You declare them in your configuration, and a plugin manager handles downloading, updating, and loading. They are central to Neovim, transforming your configuration into a functional editor.

Neovim Directories

Neovim follows the XDG base directory conventions, which means it spreads files across a few purpose-specific folders instead of putting everything under ~/.config.

The two you will care about most:

  • Config: ~/.config/nvim (your init.lua, Lua modules, and any checked-in config)
  • Data: ~/.local/share/nvim (downloaded plugins, compiled parsers, and other persistent runtime data)

Two more that explain where the noise goes:

  • State: ~/.local/state/nvim (session-like state such as history files)
  • Cache: ~/.cache/nvim (rebuildable caches and temporary artifacts)

If you want to confirm the exact paths on your machine, ask Neovim directly:

:lua print(vim.fn.stdpath("config"))
:lua print(vim.fn.stdpath("data"))
:lua print(vim.fn.stdpath("state"))
:lua print(vim.fn.stdpath("cache"))

When something breaks, this mental model saves time: config is what you wrote, data is what your tooling installed, state is what Neovim remembers, and cache is safe to delete.

Choose a Plugin Manager or Distribution

Neovim’s plugin ecosystem is large and sometimes overwhelming.

Think of it like a kitchen: plugins are tools, the plugin manager is the drawer organizer, and a distribution is a fully stocked kitchen. Someone already set up the tools and workflow, so you’re ready to cook from day one.

Three layers:

graph TB A["Plugin Manager
(handles installing and loading plugins)"] B["Individual Plugins
(each adds a specific capability)"] C["Distributions
(preconfigured bundles of plugins + settings)"] C --> A C --> B A --> B

Plugin Directories and Discovery

If you want to explore what is possible before committing to a particular distribution, these directories help you browse plugins and configs by category.

NeovimCraft Curated Neovim plugins and configuration resources.

Browse NeovimCraft.

Dotfyle Neovim plugin discovery plus a gallery of real configs.

Browse Dotfyle.

nvim.store A large, searchable catalog of Neovim plugins.

Browse nvim.store.

VimAwesome A directory of Vim plugins sourced from GitHub, Vim.org, and user submissions.

Browse VimAwesome.

Plugin Managers

vim.pack is Neovim’s built-in plugin manager, shipped in Neovim 0.12 (March 2026). Because it lives in core, there is nothing to bootstrap: no install script, no clone step, no external dependency. That makes it the fastest way to start managing plugins and the simplest to reason about.

Why start here:

  • Built in. It ships with Neovim and works with a few lines of Lua, no setup required.
  • Small API. vim.pack.add() installs and loads plugins, vim.pack.update() updates them behind a confirmation step, and vim.pack.del() removes them. Three functions cover most workflows.
  • Plain specs. Point it at a Git URL as a string, or use a table to pin a branch, tag, or semantic version range.
  • Lockfile. nvim-pack-lock.json records plugin state, so a config reproduces across machines.

vim.pack favors simplicity over features. Lazy loading is possible by deferring vim.pack.add() with an autocommand, but it is not the focus. For a fast, dependency-free start, use vim.pack; reach for lazy.nvim when you want a richer feature set.

lazy.nvim

lazy.nvim is a modern standard. Written by folke, it replaced packer.nvim (now archived) as the community default.

What makes it different:

  • Lazy loading. Plugins load only when needed, keeping startup fast despite dozens installed.
  • Lockfile support. lazy-lock.json pins each plugin to an exact commit, ensuring your config is reproducible across machines.
  • Dependency resolution. Declare dependencies in your spec, lazy.nvim handles load order.
  • Built-in UI. A dashboard shows plugin status, updates, and profiling. Run :Lazy to open it.

If you want full control over your setup, use lazy.nvim.

vim-plug

vim-plug is the veteran. It works in Vim and Neovim, has simpler syntax, and loads all plugins at startup by default.

If your setup works in both Vim and Neovim, use vim-plug. For Neovim-only, lazy.nvim offers more control.

rocks.nvim

rocks.nvim installs plugins via luarocks, the Lua package manager, instead of cloning git repos. Plugins declare dependencies, and version resolution follows standard package management conventions.

The tradeoff: not all plugins publish to luarocks yet, so the catalog is smaller.

Distributions

Distributions give you a working IDE without days of configuration.

LazyVim

LazyVim is the most popular distribution, built on lazy.nvim by the same author.

  • Sensible defaults for most programming workflows.
  • A modular system for language or tool-specific bundles.
  • Clear override points to change behavior without forking config.
  • Excellent documentation with a searchable keymaps reference.

Analyze its choices, then choose what to keep or replace.

kickstart.nvim

kickstart.nvim is a single init.lua file (about 500 lines) with a minimal, documented config. Fork, read, and customize it. Maintained by Neovim core contributor TJ DeVries.

NvChad

NvChad emphasizes aesthetics and performance with a polished UI, custom theme system, and quick startup. It uses its own configuration structure, so customization follows its conventions instead of Neovim’s defaults.

AstroNvim

AstroNvim is community-driven, with settings grouped by “community packs” (language-specific plugin bundles). It offers thorough documentation, and a community-maintained library of shared configurations.

Choosing Your Approach

How much do you want to learn about Neovim’s internals?

  • Maximum learning, maximum control: Begin with a bare init.lua, add lazy.nvim, then install plugins one at a time. It’s slow but educational.
  • Guided learning: Fork kickstart.nvim, read comments, and modify as you go. Working setup on day one.
  • Productive immediately: Install LazyVim or AstroNvim for an IDE-like experience in minutes; customize later.

A common path: start with a manual config, move to LazyVim, and learn more from its source than from tutorials.

Command Reference

Find a keybinding fast with the search box. The commands below also work in the practice editor, with the few exceptions listed there.

  • h - Move left
  • j - Move down
  • k - Move up
  • l - Move right
  • $ - Go to the end of the current line
  • ^ - Go to the first non-blank character of the line
  • G - Go to the last line of the file
  • gg - Go to the first line of the file
  • w - Move to the start of the next word
  • b - Move back to the start of the word
  • { - Move back to the previous blank line (the paragraph start)
  • } - Move forward to the next blank line (the paragraph end)
  • Ctrl-u - Scroll up half a screen
  • Ctrl-d - Scroll down half a screen
  • Ctrl-b - Scroll back one screen
  • Ctrl-f - Scroll forward one screen

Window Commands

  • :new filename - Open a new window editing an empty file (or filename, if given)
  • :split - Split the window horizontally
  • :vsplit - Split the window vertically
  • :q - Close the current window
  • Ctrl-w s - Split the window horizontally
  • Ctrl-w v - Split the window vertically
  • Ctrl-w w - Cycle through all windows
  • Ctrl-w q - Close the current window

Tab Commands

  • :tabnew - Create a new tab
  • :tabnext - Move to the next tab
  • :tabprevious - Move to the previous tab
  • :tabclose - Close the current tab
  • gt - Move to the next tab
  • gT - Move to the previous tab
  • 1gt - Move to the first tab
  • 2gt - Move to the second tab

File Commands

  • :! mkdir directory - Create a new directory
  • :! touch filename - Create a new file
  • :edit filename - Edit a file
  • :e filename - Edit a file
  • :write - Save the file
  • :w - Save the file
  • :x - Save the file if it changed, then close the window
  • :exit - Same as :x, save if changed, then close the window
  • :q - Close the current window (Neovim quits when it is the last one)
  • gx - Open the file path or URL under the cursor with the system handler

Directory Commands

  • nvim . - Open the current directory in the file explorer
  • :pwd - Print the current working directory
  • :cd /path/to/directory - Change the current working directory
  • :Explore - Open the file explorer
  • d - Create a new directory (in Explore)
  • % - Open a new file in the explorer’s directory (in Explore)

Editing Commands

File Operations

  • dG - Delete from the current line to the end of the file
  • dd - Delete the current line

Paragraph Operations

  • d{ - Delete back to the previous blank line
  • d} - Delete forward to the next blank line
  • d/^$ - Delete from the cursor up to the next empty line

Block Operations

  • dib - Delete inside a () block, keeping the parentheses
  • daB - Delete a {} block, including the braces

Word Operations

  • diw - Delete inner word (only the word, no surrounding spaces)
  • daw - Delete a word (the word and any trailing space)
  • dw - Delete from the cursor to the start of the next word
  • db - Delete from the cursor back to the start of the word

Sentence Operations

  • d( - Delete back to the start of the sentence
  • d) - Delete forward to the start of the next sentence
  • dis - Delete inside the sentence, leaving the white space around it
  • das - Delete a sentence and the white space after it

General Operations

  • p - Put the deleted text after the cursor
  • P - Put the deleted text before the cursor
  • u - Undo the last change
  • Ctrl-r - Redo the last change
  • Ctrl-g - Show the file name and its status (modified, read-only); it adds the cursor position only when ‘ruler’ is off (‘ruler’ is on by default)

Configuration Commands

  • :help runtimepath - Show help for the runtimepath option, the directories Neovim searches for config and plugins
  • :h rtp - Short form of :help runtimepath
  • :checkhealth - Run Neovim’s built-in diagnostics

Learn Neovim: Beyond the Basics

When the basics feel natural, these resources go deeper.

Books

  • Practical Vim, a comprehensive guide to Vim/Neovim mastery by Drew Neil.

Practice

  • Run vimtutor in your terminal for an interactive intro to Vim’s editing model.
  • Use Vimaroo, a free browser-based game for practicing Vim motions (works on any platform, including macOS).

Configuration

Core Documentation

Plugin Managers and Runtime Tooling

  • vim.pack, Neovim’s built-in plugin manager (since v0.12).
  • lazy.nvim, the modern plugin manager for Neovim.
  • vim-plug, a minimalist plugin manager for Vim and Neovim.
  • rocks.nvim, luarocks-based plugin management.
  • luarocks, the Lua package manager.
  • packer.nvim, the archived predecessor to lazy.nvim.

Distributions and Starter Configs

  • LazyVim, a Neovim distribution built on lazy.nvim.
  • kickstart.nvim, a documented, minimal starting configuration.
  • NvChad, an aesthetics-focused Neovim distribution.
  • AstroNvim, a community-driven Neovim distribution.

Plugin Discovery Directories

  • NeovimCraft, a curated directory of Neovim plugins and configs.
  • Dotfyle, a Neovim plugin and configuration discovery site.
  • nvim.store, a large catalog of Neovim plugins.
  • VimAwesome, a directory of Vim plugins sourced from GitHub, Vim.org, and user submissions.
  • coc.nvim, a Vim/Neovim completion framework using LSP.
  • Learn Tmux teaches the terminal multiplexer that runs Neovim beside your shell, tests, and logs in split panes.
  • What Is fzf? covers the fuzzy finder behind the file pickers in LazyVim and other Neovim setups.
  • What Is tmux? explains the terminal multiplexer that pairs with Neovim for split panes and persistent sessions.
  • How Do I Use Tmux? walks through tmux sessions, windows, and panes alongside your editor.