# Neovim Keybinds & Commands Cheatsheet ## LSP | Key | Action | |-----|--------| | `gd` | Go to definition (reuses existing split) | | `gD` | Go to declaration | | `gi` | Go to implementation | | `gr` | Go to references | | `gt` | Go to type definition | | `K` | Hover documentation | | `` | Signature help (normal + insert) | | `ca` | Code action | | `rn` | Rename symbol | | `f` | Format file | ## Diagnostics | Key | Action | |-----|--------| | `[d` | Previous diagnostic | | `]d` | Next diagnostic | | `gl` | Open diagnostic float | | `q` | Buffer diagnostics to loclist | Go files auto-format and organize imports on save. ## Autocompletion (blink.cmp) | Key | Action | |-----|--------| | `` | Trigger completion menu | | `` | Next item | | `` | Previous item | | `` | Confirm selection | | `` | Dismiss menu | | `` | Scroll docs up | | `` | Scroll docs down | Sources: LSP, buffer words, file paths. ## Pane Navigation | Key | Action | |-----|--------| | `` | Move left (or prev terminal tab in popup) | | `` | Move right (or next terminal tab in popup) | | `` | Move down | | `` | Move up | Navigation wraps around (left from leftmost goes to rightmost). Alt+h/l switch terminal tabs when the popup terminal is open. ## Buffer Tabs (per-split) | Key | Action | |-----|--------| | `` | Next buffer in current split | | `` | Previous buffer in current split | | `x` | Close current buffer | | `:q` | Close current buffer (keeps split) | | `:wq` | Save and close current buffer | Each file belongs to one split only. Selecting an already-open file from oil focuses its split. ## File Explorer (oil.nvim) | Key / Command | Action | |---------------|--------| | `e` | Toggle file tree (left sidebar) | | `-` or `` | Go up one directory | | `` | Open file in last used code split | | `d` | Delete file/directory under cursor | | `g.` | Toggle hidden files | | `` | Preview file | | `` | Close oil | | `:w` (in oil buffer) | Save filesystem changes (renames, moves, etc.) | File tree opens automatically on startup. Edit filenames directly in the buffer, then `:w` to apply. ## Popup Terminal | Key | Action | |-----|--------| | `` | Toggle popup terminal | | `` | Previous terminal tab | | `` | Next terminal tab | | `` | New terminal tab | | `` | Close terminal tab | | `` | Paste from clipboard | | `` | Exit to normal mode | Terminal session persists when hidden. Tab indicator in title: `Terminal [1] 2 3`. ## Task Runner (overseer.nvim) | Command | Action | |---------|--------| | `:OverseerRun` | Pick and run a task | | `:OverseerToggle` | Toggle task list panel | | `:OverseerInfo` | Show overseer status/info | | `:OverseerBuild` | Build a task from scratch | | `:OverseerQuickAction` | Run quick action on recent task | | `:OverseerTaskAction` | Pick a task, then an action | | `:OverseerClearCache` | Clear cached tasks | Tasks integrate with quickfix: errors populate the quickfix list. ## Mason (LSP server management) | Command | Action | |---------|--------| | `:Mason` | Open Mason UI | | `:MasonInstall ` | Install a server | | `:MasonUninstall ` | Remove a server | | `:MasonUpdate` | Update all servers | Auto-installed servers: `gopls`, `bashls`, `ansiblels`, `yamlls`. ## Treesitter | Command | Action | |---------|--------| | `:TSInstall ` | Install a parser | | `:TSUpdate` | Update all parsers | | `:TSInstall go bash yaml lua` | Install all configured parsers | Syntax highlighting is automatic once a parser is installed. ## Quickfix List (built-in) | Key / Command | Action | |---------------|--------| | `:copen` | Open quickfix window | | `:cclose` | Close quickfix window | | `:cnext` / `]q` | Next quickfix item | | `:cprev` / `[q` | Previous quickfix item | ## Window Management | Key | Action | |-----|--------| | `v` | Vertical split | | `s` | Horizontal split | | `>` | Wider | | `<` | Narrower | | `+` | Taller | | `-` | Shorter | | `=` | Equal size all | | `10>` | Wider by 10 columns | Splitting from oil auto-redirects to the code area. ## Sessions / Layout | Key | Action | |-----|--------| | `ss` | Save current layout/session | | `sl` | Load saved layout/session | Saves window positions, sizes, buffers, terminals, and current directory. ## Statusline Shows: `filename [modified] [readonly]` on the left, `git-branch | line:col percent` on the right.