NeoVim ships with keymaps you get for free. These have evolved significantly, especially in 0.10 and 0.11. Knowing them avoids redundant config.
LSP Keymaps (0.11+)
These activate when an LSP client attaches to a buffer:
Keymap
Mode
Action
grn
Normal
vim.lsp.buf.rename()
gra
Normal, Visual
vim.lsp.buf.code_action()
grr
Normal
vim.lsp.buf.references()
gri
Normal
vim.lsp.buf.implementation()
grt
Normal
vim.lsp.buf.type_definition()
grx
Normal
vim.lsp.codelens.run()
gO
Normal
vim.lsp.buf.document_symbol()
<C-S>
Insert
vim.lsp.buf.signature_help()
K
Normal
vim.lsp.buf.hover() (since 0.10)
Tip: The gr prefix is mnemonic: “go refactor” (rename, action, references). gO is “go outline”. These don’t conflict with common custom mappings.
Diagnostic Navigation
Keymap
Mode
Action
]d
Normal
Jump to next diagnostic
[d
Normal
Jump to previous diagnostic
]D
Normal
Jump to last diagnostic
[D
Normal
Jump to first diagnostic
<C-W>d
Normal
Open diagnostic float
Unimpaired-Style Navigation (0.11+)
Borrowed from vim-unimpaired, these navigate lists:
Keymap
Action
[q / ]q
Previous/next quickfix item
[Q / ]Q
First/last quickfix item
[l / ]l
Previous/next location list item
[L / ]L
First/last location list item
[t / ]t
Previous/next tag
[T / ]T
First/last tag
[a / ]a
Previous/next argument
[A / ]A
First/last argument
[b / ]b
Previous/next buffer
[B / ]B
First/last buffer
Comment Toggle
Keymap
Mode
Action
gc
Normal, Visual
Toggle comment (motion-based)
gcc
Normal
Toggle comment on current line
gc in visual
Visual
Toggle comment on selection
gcc -- Toggle comment on line
gcap -- Toggle comment on paragraph
gc3j -- Toggle comment on 3 lines down
Vjjgc -- Visual select + toggle comment
Snippet Navigation (0.11+)
Keymap
Mode
Action
<Tab>
Insert, Select
Jump to next snippet placeholder
<S-Tab>
Insert, Select
Jump to previous snippet placeholder
These only activate when inside an active snippet. Otherwise, Tab inserts a tab character.
Yanking and Visual
Keymap
Mode
Action
Y
Normal
Yank to end of line (y$)
*
Visual
Search forward for visual selection
#
Visual
Search backward for visual selection
Q
Visual
Execute last macro on each selected line
Tip:Y mapping to y$ makes it consistent with D (delete to end) and C (change to end). In stock Vim, Y is the same as yy (yank whole line), which is inconsistent.
Search and Command Line
Keymap
Mode
Action
<C-L>
Normal
Clear search highlighting + redraw screen
&
Normal
Repeat last :s substitution
Terminal Mode
Keymap
Mode
Action
<C-\><C-N>
Terminal
Exit terminal mode to normal mode
Gotcha: There’s no built-in easy escape from terminal mode. Many users add: vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-N>") for a double-Escape exit.
What NeoVim Does NOT Map
Common operations you still need to configure yourself:
Operation
Common mapping
Why it’s not default
gd (go to definition)
vim.lsp.buf.definition()
Conflicts with Vim’s built-in gd (go to local declaration)
<leader>f (find files)
telescope/fzf
Requires a plugin
<leader>e (file explorer)
netrw/oil/nvim-tree
Style preference
<C-h/j/k/l> (window nav)
<C-W>h/j/k/l
Already works with <C-W> prefix
Format on save
vim.lsp.buf.format()
Opt-in behavior
Checking Current Mappings
:map " Show all mappings
:nmap " Normal mode only
:imap " Insert mode only
:verbose map K " Show where K was mapped and by whom
-- Programmatically check a mapping
local map = vim.fn.maparg("grn", "n", false, true)
print(vim.inspect(map))