Neovim beginner guide: install, modes, save and quit, lazy.nvim plugins intro
Install nvim, switch core modes, save or quit safely, and start a lazy.nvim config.
When you want to edit configs, grep logs, or fix files over SSH without launching a GUI IDE, Neovim is the modern Vim fork: terminal-native, scriptable, and plugin-rich. This guide covers install, Normal/Insert modes, save and quit, plus a minimal lazy.nvim setup for hereink readers who live in the shell.
The query is Neovim beginner guide: install, modes, save quit, lazy.nvim plugins. You should finish able to start nvim, switch modes, save or discard changes safely, and extend init.lua.
What Neovim fixes
Edit in the terminal
On remote servers, inside tmux, or in CI containers, GUI editors are often unavailable. Neovim keeps editing, search, and macros in the same workflow as rg and git.
Config as code
Settings live in ~/.config/nvim/init.lua, version-controlled and shareable. lazy.nvim loads plugins on demand so startup stays lighter than old “install everything” bundles.
Official docs:
neovim.io/doc. After install runnvim --version; built-in:helpis the full reference.
Install on macOS, Linux, and Windows
- 1macOS (Homebrew)
brew install neovim. Verify withwhich nvimandnvim --version. Systemviis unchanged. - 2Linux packages
Debian/Ubuntu:
sudo apt update && sudo apt install neovim. Fedora:sudo dnf install neovim. Arch:sudo pacman -S neovim. Old repos: use GitHub Releases AppImage or tarball. - 3Windows
Scoop:
scoop install neovim; orwinget install Neovim.Neovim. Open a new terminal and runnvim. - 4First launch
nvim README.mdin a project. Pressito insert text,Escback to Normal.
Core modes
| Mode | Enter | Typical use |
|---|---|---|
| Normal | Default; Esc | Move, delete, yank, paste (dd, yy, p) |
| Insert | i, a, o | Type text |
| Visual | v or V | Select then d or y |
| Command | : | :w, :q, :help |
Save, quit, discard
:w " save
:q " quit (blocks if unsaved)
:wq or :x " save and quit
:q! " quit without saving
ZZ " Normal mode: save and quitMultiple buffers: :wqa save all, :qa! quit all without saving. Open a file: nvim src/main.ts.
Intro to lazy.nvim
lazy.nvim is a popular Lua plugin manager: declarative config, lazy loading, built-in UI. Minimal path:
- 1Config dir
mkdir -p ~/.config/nvimand createinit.lua. - 2Bootstrap
Copy the install block from
github.com/folke/lazy.nvimREADME intoinit.lua(clones lazy under~/.local/share/nvim/lazy/lazy.nvim). - 3First plugins
Inside
require("lazy").setup({ ... })add entries (e.g. treesitter or a colorscheme). Restartnvim; lazy installs missing plugins. - 4Daily commands
:Lazyopens the UI;:Lazy syncsyncs the lockfile. See the lazy repo docs for updates.
-- Structure sketch — use official bootstrap from lazy.nvim README
require("lazy").setup({
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "ellisonleao/gruvbox.nvim" },
})- Fits
- Terminal-heavy dev, remote editing, configs you want in git, willing to learn Normal/Insert once.
- Does not fit
- WYSIWYG layout work; teams standardized on VS Code with no one maintaining Neovim configs.
Neovim vs Vim?
Neovim is a Vim fork with modern defaults (built-in LSP client, Lua-first config). Most Vim keys still work; new plugins are mostly Lua.
:q won't exit?
Unsaved changes block quit. Use :wq or :q!. Multiple windows: :qa / :qa!.
lazy.nvim vs packer?
New setups often pick lazy.nvim (active maintenance, UI). Existing packer configs can stay; this guide shows lazy only.
Then align on one diagram
Once the editor feels right, service boundaries still belong on one shared board. See how to create a space.