diff --git a/KEYBINDS.md b/KEYBINDS.md index 7162709..08cf66a 100644 --- a/KEYBINDS.md +++ b/KEYBINDS.md @@ -1,28 +1,30 @@ # Neovim Keybinds & Commands Cheatsheet -## LSP (built-in, Neovim 0.11+) +## LSP | 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 definition (reuses existing split) | | `gD` | Go to declaration | +| `gi` | Go to implementation | +| `gr` | Go to references | +| `gt` | Go to type definition | | `K` | Hover documentation | -| `` (insert) | Signature help | +| `` | Signature help (normal + insert) | +| `ca` | Code action | +| `rn` | Rename symbol | +| `f` | Format file | -## Diagnostics (built-in) +## Diagnostics -| Key / Command | Action | -|---------------|--------| +| Key | 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 | +| `gl` | Open diagnostic float | +| `q` | Buffer diagnostics to loclist | + +Go files auto-format and organize imports on save. ## Autocompletion (blink.cmp) @@ -38,29 +40,58 @@ Sources: LSP, buffer words, file paths. -## Buffer Navigation +## Pane Navigation | Key | Action | |-----|--------| -| `` | Next buffer | -| `` | Previous buffer | -| `x` | Close current buffer | +| `` | Move left (or prev terminal tab in popup) | +| `` | Move right (or next terminal tab in popup) | +| `` | Move down | +| `` | Move up | -Each split window shows its own filename bar (winbar) at the top. +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 (in file tree) | -| `` | Open file in last used code window (auto-focuses there) | +| `-` 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, deletes, etc.) | +| `:w` (in oil buffer) | Save filesystem changes (renames, moves, etc.) | -Edit filenames directly in the buffer, then `:w` to apply. +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) @@ -74,7 +105,7 @@ Edit filenames directly in the buffer, then `:w` to apply. | `:OverseerTaskAction` | Pick a task, then an action | | `:OverseerClearCache` | Clear cached tasks | -Tasks integrate with quickfix: errors from tasks populate the quickfix list. +Tasks integrate with quickfix: errors populate the quickfix list. ## Mason (LSP server management) @@ -84,7 +115,6 @@ Tasks integrate with quickfix: errors from tasks populate the quickfix list. | `:MasonInstall ` | Install a server | | `:MasonUninstall ` | Remove a server | | `:MasonUpdate` | Update all servers | -| `:MasonLog` | View install logs | Auto-installed servers: `gopls`, `bashls`, `ansiblels`, `yamlls`. @@ -106,35 +136,21 @@ Syntax highlighting is automatic once a parser is installed. | `:cclose` | Close quickfix window | | `:cnext` / `]q` | Next quickfix item | | `:cprev` / `[q` | Previous quickfix item | -| `:cfirst` | First item | -| `:clast` | Last item | -## Window Resizing (built-in) +## Window Management | Key | Action | |-----|--------| -| `>` | Wider (right) | -| `<` | Narrower (left) | +| `v` | Vertical split | +| `s` | Horizontal split | +| `>` | Wider | +| `<` | Narrower | | `+` | 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 | +Splitting from oil auto-redirects to the code area. ## Sessions / Layout @@ -143,7 +159,7 @@ Syntax highlighting is automatic once a parser is installed. | `ss` | Save current layout/session | | `sl` | Load saved layout/session | -Saves window positions, sizes, buffers, and current directory. +Saves window positions, sizes, buffers, terminals, and current directory. ## Statusline