fix: multiple navigation fixes for splits/popup terminal

chore: update Keybinds.md

more navigation fixes (primarly disabling mouse when terminal is open)

rm session
This commit is contained in:
Wesley van Tilburg
2026-03-14 13:56:36 +01:00
committed by Wesley van Tilburg
parent bb91392a21
commit 6dfbb4ec22
5 changed files with 213 additions and 185 deletions

View File

@@ -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 |
| `<C-s>` (insert) | Signature help |
| `<C-k>` | Signature help (normal + insert) |
| `<leader>ca` | Code action |
| `<leader>rn` | Rename symbol |
| `<leader>f` | Format file |
## Diagnostics (built-in)
## Diagnostics
| Key / Command | Action |
|---------------|--------|
| Key | Action |
|-----|--------|
| `[d` | Previous diagnostic |
| `]d` | Next diagnostic |
| `<C-w>d` | Open diagnostic float |
| `:lua vim.diagnostic.setqflist()` | All diagnostics to quickfix |
| `:lua vim.diagnostic.setloclist()` | Buffer diagnostics to loclist |
| `gl` | Open diagnostic float |
| `<leader>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 |
|-----|--------|
| `<Tab>` | Next buffer |
| `<Shift-Tab>` | Previous buffer |
| `<leader>x` | Close current buffer |
| `<Alt-h>` | Move left (or prev terminal tab in popup) |
| `<Alt-l>` | Move right (or next terminal tab in popup) |
| `<Alt-j>` | Move down |
| `<Alt-k>` | 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 |
|-----|--------|
| `<Tab>` | Next buffer in current split |
| `<Shift-Tab>` | Previous buffer in current split |
| `<leader>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 |
|---------------|--------|
| `<leader>e` | Toggle file tree (left sidebar) |
| `-` or `<BS>` | Go up one directory (in file tree) |
| `<CR>` | Open file in last used code window (auto-focuses there) |
| `-` or `<BS>` | Go up one directory |
| `<CR>` | Open file in last used code split |
| `<leader>d` | Delete file/directory under cursor |
| `g.` | Toggle hidden files |
| `<C-p>` | Preview file |
| `<C-c>` | 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 |
|-----|--------|
| `<C-t>` | Toggle popup terminal |
| `<Alt-h>` | Previous terminal tab |
| `<Alt-l>` | Next terminal tab |
| `<C-n>` | New terminal tab |
| `<C-w>` | Close terminal tab |
| `<C-v>` | Paste from clipboard |
| `<Esc>` | 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 <server>` | Install a server |
| `:MasonUninstall <server>` | 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 |
|-----|--------|
| `<C-w>>` | Wider (right) |
| `<C-w><` | Narrower (left) |
| `<C-w>v` | Vertical split |
| `<C-w>s` | Horizontal split |
| `<C-w>>` | Wider |
| `<C-w><` | Narrower |
| `<C-w>+` | Taller |
| `<C-w>-` | Shorter |
| `<C-w>=` | Equal size all |
| `10<C-w>>` | Wider by 10 columns |
## General (built-in)
| Key | Action |
|-----|--------|
| `<C-w>s` | Split horizontal |
| `<C-w>v` | Split vertical |
| `<C-t>` | Toggle floating popup terminal |
| `<Alt-h/j/k/l>` | Move between panes (also works from terminal) |
| `<C-w>h/j/k/l` | Move between panes (default) |
| `:e <path>` | Open file |
| `u` | Undo |
| `<C-r>` | 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.
| `<leader>ss` | Save current layout/session |
| `<leader>sl` | Load saved layout/session |
Saves window positions, sizes, buffers, and current directory.
Saves window positions, sizes, buffers, terminals, and current directory.
## Statusline