Neovim Cheatsheet

Leader: , Neovim 0.12+ Catppuccin Mocha

LSP on attach

ShortcutAction
gdGo to definition
,fdFind definitions (Telescope)
grFind references (Telescope)
,rnRename symbol
,caCode actions
,fFormat buffer (conform.nvim, LSP fallback)
[d / ]dPrevious / next diagnostic
,dShow line diagnostics float
Ctrl+oJump back (built-in Vim)

Telescope fuzzy finder

ShortcutAction
,ffFind files
,fgLive grep
,fbFind buffers
,fhHelp tags
,frRecent files (oldfiles)

General & Files

ShortcutModeAction
,wNormalSave file (:w!)
,qNormalQuit all (:qa)
,aNormalSelect all (ggVG)
,eNormalToggle file tree (NvimTreeToggle)
,tNormalOpen terminal (:terminal)
,dbNormalToggle Dbee database client
EscNormalClear search highlight (:nohlsearch)
eeeCmdExpand to edit <current-file-dir>/

Windows & Buffers

ShortcutAction
Alt+ArrowsMove to left/right/upper/lower pane
Ctrl+h/j/k/lMove to left/lower/upper/right window
Ctrl+Up/DownResize window height (+2 / -2)
Ctrl+Left/RightResize window width (-2 / +2)
,cClose window (:close)
Shift+lNext buffer (:bnext)
Shift+hPrevious buffer (:bprevious)
,xClose buffer (:bdelete)

Navigation & Editing

ShortcutModeAction
j / kN, VMove by visual line (gj/gk), or exact line with count
J / KVisualMove selected lines down / up
< / >VisualIndent left / right (keeps selection)

Autocompletion nvim-cmp

ShortcutModeAction
Ctrl+SpaceInsertTrigger completion
EnterInsertConfirm selection
Tab / Shift+TabI, SNext / previous item (or jump snippet)
Ctrl+b / Ctrl+fInsertScroll docs up / down
Ctrl+eInsertAbort completion

Git

ShortcutAction
,gbToggle inline git blame
,gsStage hunk
,grReset hunk
,gpPreview hunk
,gwSwitch git worktree (Telescope)
,gWCreate git worktree (Telescope)

Custom Commands

CommandAction
:WSave file with sudo (SudaWrite)
:QForce quit current window (:q!)
:Qa / :QAForce quit all (:qa!)
:DbeeOpen Dbee database client
:ConformInfoShow active formatters (conform.nvim)

Servers, Formatters & Linters

  • LSPs: pyright ts_ls html cssls bashls rust_analyzer
  • Formatters (on save): ruff_organize_imports + ruff_format (Python), prettier (JS/TS/HTML/CSS/JSON/YAML/MD), shfmt (sh/bash), rustfmt (Rust), stylua (Lua)
  • Linters: ruff + ty (Python), eslint_d (JS/TS), shellcheck (sh/bash)
No matching shortcuts found.