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.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Delete the line | dd | dd | dd |
| Copy (yank) the line | yy | yy | yy |
| Paste after the cursor | p | p | p |
| Undo | u | u | u |
| Redo | Ctrlr | Ctrlr | Ctrlr |
| Search forwardn jumps to the next match. | / | / | / |
| Start of the fileG jumps to the end. | gg | gg | gg |
LSP defaults
When a language server attaches, these g-prefixed keys work without any configuration in Neovim 0.11 and later.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Rename the symbol under the cursor | grn | grn | grn |
| List references to the symbol | grr | grr | grr |
| Go to the definition | gd | gd | gd |
| List implementations | gri | gri | gri |
| Show hover information | K | K | K |
| Select a code action | gra | gra | gra |
| Open document symbols | gO | gO | gO |
Commenting and diagnostics
Use Neovim's built-in commenting, diagnostic navigation, and location-list controls.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Toggle a line commentgc with a motion comments that range, built in since Neovim 0.10. | gcc | gcc | gcc |
| Toggle a block comment | gb | gb | gb |
| Jump to the previous diagnostic]d jumps to the next one. | [d | [d | [d |
| Show diagnostics in a floating window | Ctrlwd | Ctrlwd | Ctrlwd |
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.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Open a terminal in the current windowRun :terminal. Keystrokes then go to the program inside the buffer. | Not documented | Not documented | Not documented |
| Leave terminal mode for normal mode | Ctrl\Ctrln | Ctrl\Ctrln | Ctrl\Ctrln |
| Open a terminal in its own windowRun :term or :split +terminal from anywhere. | Not documented | Not documented | Not 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.