Neovim keyboard shortcuts

Neovim keeps Vim's modal editing model and adds built-in behavior around it. This reference pairs the commands you already expect with Neovim's LSP, commenting, diagnostics, and terminal-mode defaults.

Neovim asks you to think in modes, then rewards that discipline with fast movement and small precise edits. Start with the Vim foundation, and add diagnostics, commenting, and terminal controls once the mode changes feel natural.

Core editing

The Vim foundation still applies: these work in every Neovim.

ActionWindowsmacOSLinux
Delete the linedddddd
Copy (yank) the lineyyyyyy
Paste after the cursorppp
Undouuu
RedoCtrlrCtrlrCtrlr
Search forwardn jumps to the next match.///
Start of the fileG jumps to the end.gggggg

LSP defaults

When a language server attaches, these g-prefixed keys work without any configuration in Neovim 0.11 and later.

ActionWindowsmacOSLinux
Rename the symbol under the cursorgrngrngrn
List references to the symbolgrrgrrgrr
Go to the definitiongdgdgd
List implementationsgrigrigri
Show hover informationKKK
Select a code actiongragragra
Open document symbolsgOgOgO

Commenting and diagnostics

Use Neovim's built-in commenting, diagnostic navigation, and location-list controls.

ActionWindowsmacOSLinux
Toggle a line commentgc with a motion comments that range, built in since Neovim 0.10.gccgccgcc
Toggle a block commentgbgbgb
Jump to the previous diagnostic]d jumps to the next one.[d[d[d
Show diagnostics in a floating windowCtrlwdCtrlwdCtrlwd

Terminal mode

Inside a :terminal buffer, keystrokes go to the running program. The Ctrl+\ then Ctrl+n chord is the way out to normal mode.

ActionWindowsmacOSLinux
Open a terminal in the current windowRun :terminal. Keystrokes then go to the program inside the buffer.Not documentedNot documentedNot documented
Leave terminal mode for normal modeCtrl\CtrlnCtrl\CtrlnCtrl\Ctrln
Open a terminal in its own windowRun :term or :split +terminal from anywhere.Not documentedNot documentedNot documented

Make the useful keys stick

Neovim rewards a little patience at the start. Let movement and modes become familiar before chasing clever commands, because the editor gets fast when the basic language no longer needs translation.

You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.

Make a printable sheet for this app