Note: All keybindings are now centralized in
.config/nvim/lua/plugins/which-key.lua
- Leader:
<Space>
[mode]key→ action (source_file:line)- Modes:
n(normal),i(insert),v(visual),x(visual block)
n<leader>s→ Save filen<leader>w→ Close buffer (:bd)n<leader>W→ Close all other buffersn<leader>Q→ Force close buffer (:bw)
n<S-h>→ Previous buffern<S-l>→ Next buffern<C-h/j/k/l>→ Navigate windowsn<Esc>→ Clear search highlights
n<leader>p→ Paste from clipboard with indentn<leader>P→ Paste before with indentn<leader><leader>p→ Paste over selection (keep register)n<leader>z→ Replace word under cursor globallyn<leader>d→ Delete without registern<leader>dd→ Delete line without register
n<S-j>→ Move line downv/x<S-j>→ Move selection downv/x<S-k>→ Move selection up
ngd→ Go to definitionngD→ Go to declarationngi→ Go to implementationngt→ Go to type definitionngr→ Find references
nK→ Hover documentationn<C-k>→ Signature helpn<leader>e→ Previous diagnosticn<leader>r→ Next diagnosticn<leader>F→ Diagnostic floatn<leader>E→ Copy diagnostic error
n/v<leader>ca→ Code actionn<leader>rn→ Rename symbol
<leader>i<Space>→ Add import for symbol under cursor<leader>io→ Organize imports (sort + remove unused)<leader>is→ Sort imports only<leader>iu→ Remove unused imports<leader>ia→ Add ALL missing imports<leader>if→ Fix all auto-fixable issues<leader>ir→ Remove all unused statements<leader>id→ Go to source definition<leader>iR→ Find file references<leader>iF→ Rename file & update imports
<leader>gg→ LazyGit<leader>gp→ Preview hunk<leader>gb→ Toggle blame<leader>gf→ Live grep (Telescope)
n<leader>t→ Find filesn<leader>a→ Document symbolsn<leader>u→ Undo historyn<leader>fr→ Find references
n<leader>n→ Toggle file treen<leader>N→ Reveal current file in tree
n<leader>o→ Open quickfix listn<leader>j→ Next quickfix itemn<leader>k→ Previous quickfix item
n<leader>J→ Next todon<leader>K→ Previous todon<leader>T→ Todo telescope
<leader>xx→ Toggle diagnostics<leader>xX→ Buffer diagnostics<leader>xL→ Location list<leader>xQ→ Quickfix list
<leader>cs→ Symbols (Trouble)<leader>cl→ LSP definitions/references<leader>ca→ Code action
n<leader>/→ New comment linen<C-PageDown>→ Vertical splitn<C-PageUp>→ Go to left split
i<C-b>→ Scroll docs backward (completion)i<C-f>→ Scroll docs forward (completion)i<C-Space>→ Trigger completioni<C-e>→ Abort completioni<C-y>→ Confirm completion
n)→ Next function/block startn(→ Previous function/block startn]→ Next function/block endn[→ Previous function/block end
Some plugins add their own keybindings:
- Comment.nvim:
gcin visual mode,gccin normal mode - vim-surround:
cs,ds,ysoperations - Leap.nvim:
s,S,gsfor motion - LuaSnip:
<Tab>/<S-Tab>for snippet navigation
- Press
<Space>and wait to see available leader mappings - Use
:WhichKeyto see all mappings - Use
:Telescope keymapsto search all keymaps
<leader>pconflict → clipboard paste vs register paste- Solution: Register paste moved to
<leader><leader>p
- Solution: Register paste moved to
<leader>econflict → diagnostic float vs previous diagnostic- Solution: Float moved to
<leader>F, previous kept at<leader>e
- Solution: Float moved to
<C-k>conflict → window navigation vs signature help- Solution: Kept signature help (more commonly used in coding)
- Central keybindings:
.config/nvim/lua/plugins/which-key.lua - Old locations (commented out):
- Core bindings:
vim-options.lua - LSP bindings:
lua/plugins/lsp-config.lua - Plugin bindings: Individual plugin files
- Core bindings: