← Back to Notes

Neovim Without Plugins — A Practical Guide

Everything you need to become productive in stock Neovim — modal editing, essential motions, built-in features, a minimal init.lua, and troubleshooting — no plugins required.

1. What Neovim Is (and why it's different from Vim)

Neovim is a fork of Vim, started in 2014, with two goals: modernize the codebase (Vim's C code is decades old and hard to extend) and expose a proper API so tools can embed and script the editor. In practice, that means:

  • Modal editing — the same core idea as Vim: you spend most of your time in a normal mode built for navigating and manipulating text, not typing it, and you drop into insert mode only when you actually need to type. This is the single biggest mental shift coming from editors like VS Code or Notepad.
  • Built-in Lua — Neovim embeds a Lua interpreter, so configuration and scripting can be written in a real programming language instead of Vimscript (Vimscript still works too).
  • Built-in LSP client, terminal, and more — things that required plugins in old Vim now ship in the core binary.
T
TIP

Plugins are where most Neovim tutorials rush to, but the editor's core motions and built-ins already cover 80% of daily editing. Learning the bare editor first means you'll actually understand what a plugin is doing for you later, instead of memorizing someone else's keymaps blind.


2. Installing Neovim

Neovim's own install guide is at neovim.io/doc/install — worth bookmarking, since exact package names occasionally shift.

Windows

# Winget (built into modern Windows)
winget install Neovim.Neovim

# Chocolatey
choco install neovim

# Scoop
scoop install neovim
N
NOTE

Windows 8 or later is required. If you don't want a package manager, grab the MSI installer directly from the Neovim releases page — it handles PATH setup for you. The zip archive alternative does not set PATH automatically, so the MSI is the easier manual route.

macOS

# Homebrew (recommended)
brew install neovim

# MacPorts
sudo port install neovim

Linux

# Ubuntu / Debian — from standard repos (may lag behind latest release)
sudo apt install neovim

# Ubuntu — official PPA for an up-to-date stable build
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim

# Fedora
sudo dnf install -y neovim python3-neovim

# Arch Linux
sudo pacman -S neovim

# Distro-agnostic: Flatpak
flatpak install flathub io.neovim.nvim

# Distro-agnostic: Snap
sudo snap install nvim --classic
W
WARN

A lot of "Neovim tutorial doesn't match what I see" confusion is really just an old version. Run nvim --version after installing. If it's more than a couple of major versions behind current, prefer the PPA/Flatpak/AppImage route over your distro's default repo.

Verifying the install

nvim --version
nvim

The second command should open the editor to a blank buffer. Type :q and press Enter to quit — that single command solves the most-asked Neovim question ("how do I exit this thing").


3. Core Concept — Modes

Everything in Neovim hinges on which mode you're in. Get this and the rest clicks into place; skip it and every shortcut list looks arbitrary.

ModeHow you enter itWhat it's for
NormalEsc from any mode (default/home mode)Navigating, deleting, copying, running commands
Inserti, a, o, O from NormalTyping text, like a normal text editor
Visualv (character), V (line), Ctrl+v (block)Selecting text to act on
Command-line: from NormalRunning : commands like save, quit, search-and-replace
ReplaceR from NormalOvertype existing text instead of inserting
T
TIP

Live in Normal mode. Drop into Insert only to type a burst of text, then hit Esc immediately and go back to Normal to move around. Beginners tend to stay in Insert mode and use arrow keys — that's just a worse Notepad. The speed comes from never touching the mouse or arrow keys and doing all navigation/editing from Normal mode commands.


4. Essential Motions and Editing

These are grouped by what they're for, not alphabetically, because that's how you'll actually reach for them.

Entering Insert mode

KeyEffect
iInsert before cursor
aInsert after cursor (append)
IInsert at start of line
AInsert at end of line
oOpen new line below, insert
OOpen new line above, insert
EscBack to Normal mode

Moving around

KeyEffect
h j k lLeft / down / up / right
w / bJump forward / backward one word
eJump to end of current/next word
0 / ^Start of line / first non-blank character
$End of line
gg / GTop / bottom of file
{number}GJump to line number (e.g. 42G)
Ctrl+d / Ctrl+uHalf-page down / up
%Jump to matching bracket/paren
f{char} / t{char}Jump to / just before next occurrence of {char}
; / ,Repeat last f/t forward / backward
T
TIP

h j k l keep your hand on the home row, but the real speed gain is that motions compose with editing commands. Arrow keys can only move — w, f, % become arguments to delete/change/yank commands, which is where Vim-style editing actually wins.

Editing — the verb + motion grammar

Editing commands are verbs, motions are nouns, and you combine them:

VerbMeaning
ddelete
cchange (delete, then drop into Insert)
yyank (copy)
ComboEffect
dwdelete to end of word
d$delete to end of line
dddelete whole line
cwchange word (delete word, enter Insert)
ccchange whole line
yyyank whole line
ywyank word
3dddelete 3 lines (numbers prefix any command to repeat it)
p / Ppaste after / before cursor

Text objects

Text objects let you operate on semantic chunks — words, sentences, quoted strings, parenthesized groups — without having to position the cursor exactly:

ComboEffect
ciwchange inner word (word under cursor, no surrounding space)
cawchange a word (word + surrounding space)
ci"change inside double quotes
ca"change a double-quoted string including the quotes
ci(change inside parentheses
ci{change inside curly braces
dasdelete a sentence including trailing space

Other frequently used commands

KeyEffect
uundo
Ctrl+rredo
.repeat last change — one of Neovim's most powerful commands
xdelete character under cursor
r{char}replace character under cursor with {char}
~toggle case of character under cursor
Jjoin current line with the one below
>> / <<indent / dedent line
zatoggle fold (if folding is configured)

5. Built-in Features People Assume Need a Plugin

N
NOTE

These all ship in stock Neovim. Knowing them is most of the reason a plugin-less workflow is actually viable day to day.

File explorer — netrw

Neovim ships a built-in file browser called netrw:

  • :Explore (or :Ex) — open a file explorer in the current window
  • :Vexplore / :Sexplore — same, but in a vertical/horizontal split
  • Inside netrw: Enter opens the file/folder under cursor, - goes up a directory, % creates a new file, d creates a directory, D deletes

Built-in terminal

  • :terminal (or :term) — opens a real terminal in a Neovim buffer
  • Press Ctrl+\ then Ctrl+n to drop back to Normal mode without killing the shell
  • Press i to go back into the terminal to type
  • Combine with :split / :vsplit to keep the terminal in its own pane

Marks and jumps

  • ma — set mark a at the cursor (any lowercase letter works)
  • `a — jump to exact mark a position; 'a jumps to start of that line
  • Ctrl+o / Ctrl+i — walk backward/forward through jump history
  • `` — jump back to position before the last jump (press backtick twice)

Macros

Record a sequence of edits once, replay it many times:

  1. qa — start recording into register a
  2. Do the edit sequence normally
  3. q — stop recording
  4. @a — replay once
  5. 5@a — replay 5 more times; @@ repeats whichever macro you last ran
T
TIP

Macros shine on repetitive, structured edits — reformatting a list of similar lines, wrapping values in quotes, etc. Pair them with text objects inside the macro and they become resilient to small variations between lines.

Registers (multiple clipboards)

  • "ayy — yank a line into register a
  • "ap — paste from register a
  • :reg — see everything in every register
  • "+yy — copy a line to the OS clipboard (pasteable in other apps)
  • "+p — paste from the OS clipboard

Diff mode

nvim -d file1 file2

Or use :diffthis in two split windows for a full built-in diff/merge view.

Search and replace

/searchterm        # search forward
?searchterm        # search backward
n / N              # next / previous match
:%s/old/new/g      # replace all occurrences in file
:%s/old/new/gc     # replace with confirmation on each match
:5,10s/old/new/g   # replace only in lines 5–10

6. A Minimal Plugin-Free init.lua

Meaningfully better defaults without installing a single plugin:

Config file location:

  • Linux/macOS: ~/.config/nvim/init.lua
  • Windows: ~/AppData/Local/nvim/init.lua
-- ~/.config/nvim/init.lua
local opt = vim.opt

-- Line numbers: absolute on current line, relative elsewhere
-- (relative numbers make 5j / 5dd-style counted motions trivial to judge)
opt.number = true
opt.relativenumber = true

-- Indentation: 2 spaces, no tabs, match indent on new lines
opt.expandtab = true
opt.shiftwidth = 2
opt.tabstop = 2
opt.smartindent = true

-- Search: case-insensitive unless you type a capital letter
opt.ignorecase = true
opt.smartcase = true
opt.incsearch = true   -- show matches as you type
opt.hlsearch = true    -- highlight all matches

-- Quality of life
opt.wrap = false              -- don't soft-wrap long lines
opt.scrolloff = 8             -- keep 8 lines of context above/below cursor
opt.clipboard = "unnamedplus" -- use OS clipboard for yank/paste by default
opt.undofile = true           -- persistent undo across sessions
opt.termguicolors = true      -- full-color terminal UI

-- Keymaps (leader key must be set before any <leader> mapping)
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>w", ":w<CR>", { desc = "Save file" })
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
vim.keymap.set("n", "<Esc>", ":nohlsearch<CR>", { desc = "Clear search highlight" })
vim.keymap.set("n", "<leader>e", ":Explore<CR>", { desc = "Open file explorer" })
N
NOTE

The leader key is just a prefix you reserve for your own shortcuts so they never collide with Neovim's built-in commands. Space is the most common choice because it's unused in Normal mode and easy to reach.


7. Troubleshooting

W
WARN

If you open Neovim and feel stuck — press Esc a few times to guarantee you're in Normal mode, then type :q! and press Enter. This discards changes and quits — always works as an escape hatch.

Arrow keys or backspace act weird, or I see garbled characters. Your terminal emulator may not be sending proper terminal codes. Try a modern terminal (Windows Terminal, iTerm2, GNOME Terminal, Alacritty, Kitty) — old terminals like cmd.exe's legacy console are the usual culprit on Windows.

Colors look wrong or washed out. Set opt.termguicolors = true in your config and confirm your terminal emulator supports true color. Some SSH sessions or the default Windows console don't.

:w fails with "permission denied". You don't have write permission on the file. On Linux/macOS:

:w !sudo tee % > /dev/null

This writes the buffer via sudo without needing to restart Neovim as root.

I accidentally typed into the file instead of running a command. You were in Insert mode when you meant to be in Normal/Command mode. Press Esc, verify with : that a prompt appears at the bottom, then retry.

Undo isn't persisting between sessions. Add opt.undofile = true to your config. Neovim creates the undo directory automatically on first use, but a broken permissions setup can block it.

Clipboard yank/paste doesn't reach the OS clipboard. Run :checkhealth and look at the provider section — on Linux you need a clipboard tool installed (xclip, xsel, or wl-clipboard depending on X11/Wayland). macOS and Windows have it built in.

Neovim feels slow on startup. Run nvim --startuptime startup.log then open startup.log to see what's taking time. In a plugin-less setup this is rare but antivirus scanning on Windows can cause it.

"Swap file already exists" warning on open. Neovim crashed last time or the file is open elsewhere. Options: (R)ecover to restore unsaved changes, (D)elete if you're sure no other session has it open, or (Q)uit to inspect safely first with nvim -r filename.

Something seems broken and you don't know why. :checkhealth is the first command to run — Neovim's built-in self-diagnostic flags missing providers, config errors, and more, each with a suggested fix.


8. Quick Reference Card

TaskCommand
Save / quit / save & quit:w / :q / :wq
Force quit without saving:q!
Undo / redou / Ctrl+r
Delete line / word / chardd / dw / x
Change inside quotes/parensci" / ci(
Copy / paste lineyy / p
Repeat last change.
Search / next / previous/text, n, N
Find & replace in file:%s/old/new/g
Split window vertically:vsplit
Move between windowsCtrl+w + h/j/k/l
Open file explorer:Explore
Open terminal:terminal
Record / replay macroqa ... q / @a
Run health check:checkhealth
N
NOTE

Muscle memory beats memorization — the fastest way to internalize these is to force yourself to use them instead of the mouse for a week, even when it feels slower at first.