# Neovim Keybinds & Commands Cheatsheet ## LSP (built-in, Neovim 0.11+) | Key | Action | |-----|--------| | `grn` | Rename symbol | | `grr` | Go to references | | `gra` | Code action | | `gri` | Go to implementation | | `gO` | Document symbols | | `gd` | Go to definition | | `gD` | Go to declaration | | `K` | Hover documentation | | `` (insert) | Signature help | ## Diagnostics (built-in) | Key / Command | Action | |---------------|--------| | `[d` | Previous diagnostic | | `]d` | Next diagnostic | | `d` | Open diagnostic float | | `:lua vim.diagnostic.setqflist()` | All diagnostics to quickfix | | `:lua vim.diagnostic.setloclist()` | Buffer diagnostics to loclist | ## 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. ## Buffer Navigation | Key | Action | |-----|--------| | `` | Next buffer | | `` | Previous buffer | | `x` | Close current buffer | Each split window shows its own filename bar (winbar) at the top. ## File Explorer (oil.nvim) | Key / Command | Action | |---------------|--------| | `e` | Toggle file tree (left sidebar) | | `-` or `` | Go up one directory (in file tree) | | `` | Open file in last used code window (auto-focuses there) | | `g.` | Toggle hidden files | | `` | Preview file | | `` | Close oil | | `:w` (in oil buffer) | Save filesystem changes (renames, deletes, etc.) | Edit filenames directly in the buffer, then `:w` to apply. ## 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 from tasks 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 | | `:MasonLog` | View install logs | 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 | | `:cfirst` | First item | | `:clast` | Last item | ## Window Resizing (built-in) | Key | Action | |-----|--------| | `>` | Wider (right) | | `<` | Narrower (left) | | `+` | Taller | | `-` | Shorter | | `=` | Equal size all | | `10>` | Wider by 10 columns | ## General (built-in) | Key | Action | |-----|--------| | `s` | Split horizontal | | `v` | Split vertical | | `` | Toggle floating popup terminal | | `` | Move between panes (also works from terminal) | | `h/j/k/l` | Move between panes (default) | | `:e ` | Open file | | `u` | Undo | | `` | Redo | | `.` | Repeat last change | | `*` | Search word under cursor | | `:noh` | Clear search highlight | ## Sessions / Layout | Key | Action | |-----|--------| | `ss` | Save current layout/session | | `sl` | Load saved layout/session | Saves window positions, sizes, buffers, and current directory. ## Statusline Shows: `filename [modified] [readonly]` on the left, `git-branch | line:col percent` on the right.