# Neovim Keymap Reference > **Last Updated:** November 1, 2025 > **Organization Status:** ⚠️ NEEDS CLEANUP - Duplicates and conflicts identified ## Table of Contents - [Global Keymaps](#global-keymaps) - [LSP Keymaps](#lsp-keymaps) - [Language-Specific Keymaps](#language-specific-keymaps) - [Conflicts & Duplicates](#conflicts--duplicates) - [Proposed Organization](#proposed-organization) --- ## Global Keymaps ### Window Navigation | Key | Mode | Action | Status | |-----|------|--------|--------| | `` | n | Move to left window | ✅ Keep | | `` | n | Move to right window | ✅ Keep | | `` | n | Move to lower window | ⚠️ **CONFLICT** with Telescope | | `` | n | Move to upper window | ⚠️ **CONFLICT** with Telescope | ### Quit Commands | Key | Mode | Action | Status | |-----|------|--------|--------| | `Q` | n | Quit all | ✅ Keep | | `q` | n | Open diagnostic quickfix | ✅ Keep | ### File Explorer | Key | Mode | Action | Status | |-----|------|--------|--------| | `\` | n | Toggle Neo-tree | ✅ Keep (user requested) | ### Terminal | Key | Mode | Action | Status | |-----|------|--------|--------| | `` | t | Exit terminal mode | ✅ Keep | ### Escape/Clear | Key | Mode | Action | Status | |-----|------|--------|--------| | `` | n | Clear highlights + close floats | ✅ Keep | --- ## Search/Telescope (`s`) | Key | Mode | Action | Status | |-----|------|--------|--------| | `sh` | n | Search Help | ✅ Keep | | `sk` | n | Search Keymaps | ✅ Keep | | `sf` | n | Search Files | ✅ Keep | | `ss` | n | Search Select Telescope | ✅ Keep | | `sw` | n | Search current Word | ✅ Keep | | `sg` | n | Search by Grep | ✅ Keep | | `sd` | n | Search Diagnostics | ✅ Keep | | `sr` | n | Search Resume | ✅ Keep | | `s.` | n | Search Recent Files | ✅ Keep | | `s/` | n | Search in open files | ✅ Keep | | `sn` | n | Search Neovim config | ✅ Keep | | `/` | n | Fuzzy search in buffer | ✅ Keep | | `` | n | Find buffers | ✅ Keep | ### Telescope Navigation (Within Telescope) | Key | Mode | Action | Status | |-----|------|--------|--------| | `` | i | Next item | ⚠️ **CONFLICT** with window nav | | `` | i | Previous item | ⚠️ **CONFLICT** with window nav | --- ## Session (`S`) | Key | Mode | Action | Status | |-----|------|--------|--------| | `Ss` | n | Session save | ✅ Keep | | `Sr` | n | Session restore | ✅ Keep | | `Sd` | n | Session delete | ✅ Keep | --- ## LSP Keymaps (All Languages) ### Go-to Commands (`gr*`) | Key | Mode | Action | Status | |-----|------|--------|--------| | `grd` | n | Go to Definition | ✅ Keep | | `grD` | n | Go to Declaration | ✅ Keep | | `gri` | n | Go to Implementation | ✅ Keep | | `grr` | n | Go to References | ✅ Keep | | `grt` | n | Go to Type Definition | ✅ Keep | | `grn` | n | Rename | ✅ Keep | | `gra` | n,v | Code Action | ⚠️ **DUPLICATE** (also `.` in Flutter) | ### Other LSP | Key | Mode | Action | Status | |-----|------|--------|--------| | `K` | n | Hover Documentation | ✅ Keep | | `gO` | n | Document Symbols | ✅ Keep | | `gW` | n | Workspace Symbols | ✅ Keep | --- ## Toggle (`t`) | Key | Mode | Action | Status | |-----|------|--------|--------| | `th` | n | Toggle Inlay Hints | ✅ Keep | --- ## Diagnostics/Quickfix (`x`) | Key | Mode | Action | Status | |-----|------|--------|--------| | `xx` | n | Toggle diagnostics list (Trouble) | ✅ Keep | | `xX` | n | Toggle buffer diagnostics (Trouble) | ✅ Keep | | `xs` | n | Toggle symbols (Trouble) | ✅ Keep | --- ## Git Hunks (`h`) | Key | Mode | Action | Status | |-----|------|--------|--------| | `hs` | n,v | Stage hunk | ✅ Keep | | `hr` | n,v | Reset hunk | ✅ Keep | | `hS` | n | Stage buffer | ✅ Keep | | `hu` | n | Undo stage hunk | ✅ Keep | | `hR` | n | Reset buffer | ✅ Keep | | `hp` | n | Preview hunk | ✅ Keep | | `hb` | n | Blame line | ✅ Keep | | `hd` | n | Diff this | ✅ Keep | | `hD` | n | Diff this ~ | ✅ Keep | --- ## Language-Specific Keymaps ### Flutter/Dart (`f`, `d`) #### Flutter Workflow | Key | Mode | Action | Status | |-----|------|--------|--------| | `fr` | n | Flutter Run | ✅ Keep | | `fR` | n | Flutter Hot Restart | ✅ Keep | | `fq` | n | Flutter Quit | ✅ Keep | | `fd` | n | Flutter Devices (select) | ✅ Keep | | `fe` | n | Flutter Emulators | ✅ Keep | | `fo` | n | Flutter Outline Toggle | ✅ Keep | | `fc` | n | Flutter Copy Profiler URL | ✅ Keep | | `fl` | n | Flutter LSP Restart | ✅ Keep | #### Flutter Code Actions | Key | Mode | Action | Status | |-----|------|--------|--------| | `.` | n,v | Code Actions (Cmd+.) | ⚠️ **DUPLICATE** with `gra` | | `gra` | n,v | Code Action | ⚠️ **DUPLICATE** with `.` | #### Debug (Flutter/Dart) | Key | Mode | Action | Status | |-----|------|--------|--------| | `` | n | Debug: Start/Continue | ✅ Keep | | `` | n | Debug: Step Over | ✅ Keep | | `` | n | Debug: Step Into | ✅ Keep | | `` | n | Debug: Step Out | ✅ Keep | | `db` | n | Debug: Toggle Breakpoint | ✅ Keep | | `dB` | n | Debug: Conditional Breakpoint | ✅ Keep | | `dc` | n | Debug: Continue | ⚠️ **DUPLICATE** with `` | | `dt` | n | Debug: Terminate | ✅ Keep | | `du` | n | Debug: Toggle UI | ✅ Keep | ### Rust (`r`, `c`) #### Rust Tools | Key | Mode | Action | Status | |-----|------|--------|--------| | `rh` | n | Rust Hover Actions | ✅ Keep | | `ra` | n | Rust Code Actions | ✅ Keep | | `re` | n | Rust Explain Error | ✅ Keep | | `rc` | n | Rust Open Cargo.toml | ⚠️ **CONFLICT** with Crates (in Cargo.toml) | | `rp` | n | Rust Parent Module | ✅ Keep | | `rj` | n | Rust Join Lines | ✅ Keep | #### Crates (Cargo.toml only) | Key | Mode | Action | Status | |-----|------|--------|--------| | `ct` | n | Crates Toggle | ✅ Keep | | `cr` | n | Crates Reload | ⚠️ **CONFLICT** with `rc` in .rs files | | `cv` | n | Crates Show Versions | ✅ Keep | | `cf` | n | Crates Show Features | ✅ Keep | | `cd` | n | Crates Show Dependencies | ✅ Keep | | `cu` | n,v | Crates Update | ✅ Keep | | `ca` | n | Crates Update All | ✅ Keep | | `cU` | n,v | Crates Upgrade | ✅ Keep | | `cA` | n | Crates Upgrade All | ✅ Keep | | `ce` | n | Crates Expand to inline | ✅ Keep | | `cE` | n | Crates Extract to table | ✅ Keep | | `cH` | n | Crates Open Homepage | ✅ Keep | | `cR` | n | Crates Open Repository | ✅ Keep | | `cD` | n | Crates Open Documentation | ✅ Keep | | `cC` | n | Crates Open Crates.io | ✅ Keep | ### Python (`p`) | Key | Mode | Action | Status | |-----|------|--------|--------| | (No keymaps defined yet) | - | - | ⚠️ Need to add | ### Svelte (`v`) | Key | Mode | Action | Status | |-----|------|--------|--------| | (No keymaps defined yet) | - | - | ⚠️ Need to add | --- ## Conflicts & Duplicates ### 🔴 Critical Conflicts 1. **Window Navigation vs Telescope Navigation** - `` and `` used for BOTH window navigation AND Telescope item navigation - **Impact:** Medium - Can't navigate windows while Telescope is open - **Resolution:** Telescope should use different keys or remain as-is (works in insert mode) 2. **Code Actions: `gra` vs `.`** - Both do the same thing in Flutter/Dart files - **Impact:** Low - Just redundant - **Resolution:** Keep both (muscle memory from different editors) 3. **Debug Continue: `` vs `dc`** - Both do the same thing - **Impact:** Low - Just redundant - **Resolution:** Keep both (F5 is standard, leader-based for discoverability) 4. **Rust Cargo.toml conflicts** - `rc` means different things in `.rs` vs `Cargo.toml` files - `cr` means different things in `.rs` vs `Cargo.toml` files - **Impact:** High - Same key does different things based on filename - **Resolution:** This is acceptable since they're context-dependent (filetype-specific) ### 🟡 Minor Issues 1. **No Python or Svelte keymaps** - Missing language-specific shortcuts - **Resolution:** Add `p` for Python, `v` for Svelte 2. **No unified debug keymaps** - Debug keys only in Flutter, not available globally - **Resolution:** Move debug keymaps to global scope if DAP is loaded --- ## Proposed Organization ### Leader Key Groups (LazyVim-style with Icons) ``` ├── → Buffers ├── / → Search in buffer ├── . → Code action (Flutter/Dart specific) ├── Q → Quit all ├── q → Quickfix diagnostics │ ├── 󰊄 b → [B]uffer operations (NEW) │ ├── bd → Delete buffer │ ├── bD → Delete buffer (force) │ ├── bn → Next buffer │ ├── bp → Previous buffer │ └── bP → Pin buffer │ ├── c → [C]ode operations (NEW - UNIFY CODE ACTIONS) │ ├── ca → Code action │ ├── cf → Format │ ├── cr → Rename │ └── cs → Symbol search │ ├── d → [D]ebug (GLOBAL - move from Flutter-only) │ ├── db → Toggle breakpoint │ ├── dB → Conditional breakpoint │ ├── dc → Continue │ ├── di → Step into │ ├── do → Step out │ ├── dO → Step over │ ├── dt → Terminate │ └── du → Toggle UI │ ├── f → [F]lutter (Dart files only) │ ├── fr → Run │ ├── fR → Hot restart │ ├── fq → Quit │ ├── fd → Devices │ ├── fe → Emulators │ ├── fo → Outline toggle │ ├── fc → Copy profiler URL │ └── fl → LSP restart │ ├── g → [G]it (RENAME from h) │ ├── gs → Stage hunk │ ├── gr → Reset hunk │ ├── gS → Stage buffer │ ├── gu → Undo stage │ ├── gR → Reset buffer │ ├── gp → Preview hunk │ ├── gb → Blame line │ ├── gd → Diff this │ └── gD → Diff this ~ │ ├── p → [P]ython (Python files only) (NEW) │ ├── pr → Run file │ ├── pR → Run with args │ ├── pi → Import sort │ ├── pe → Select environment │ └── pt → Run tests │ ├── r → [R]ust (Rust files only) │ ├── rh → Hover actions │ ├── ra → Code actions │ ├── re → Explain error │ ├── rc → Open Cargo.toml │ ├── rp → Parent module │ ├── rj → Join lines │ ├── rt → Runnables │ └── rr → Run (NEW) │ │ │ └── rc → [C]rates (Cargo.toml only) │ ├── rct → Toggle │ ├── rcr → Reload │ ├── rcv → Show versions │ ├── rcf → Show features │ ├── rcd → Show dependencies │ ├── rcu → Update crate │ ├── rca → Update all │ ├── rcU → Upgrade crate │ └── rcA → Upgrade all │ ├── s → [S]earch │ ├── sh → Help │ ├── sk → Keymaps │ ├── sf → Files │ ├── ss → Select Telescope │ ├── sw → Current word │ ├── sg → Grep │ ├── sd → Diagnostics │ ├── sr → Resume │ ├── s. → Recent files │ ├── s/ → Open files │ ├── sn → Neovim config │ └── sc → Cheatsheet (NEW) │ ├── S → [S]ession │ ├── Ss → Save │ ├── Sr → Restore │ └── Sd → Delete │ ├── t → [T]oggle │ ├── th → Inlay hints │ ├── td → Diagnostics │ ├── tl → Line numbers │ ├── tr → Relative numbers │ ├── ts → Spell check │ ├── tw → Wrap │ └── tc → Conceallevel │ ├── u → [U]I (NEW) │ ├── un → Noice dismiss │ ├── ul → Lazy │ ├── um → Mason │ └── ui → Inspect tree │ ├── v → S[v]elte (Svelte files only) (NEW) │ └── (TBD) │ ├── w → [W]indow operations (NEW) │ ├── ww → Other window │ ├── wd → Delete window │ ├── ws → Split below │ ├── wv → Split right │ └── wm → Maximize toggle │ └── x → Diagnostics/quickfi[X] ├── xx → Toggle diagnostics ├── xX → Buffer diagnostics └── xs → Symbols ``` ### Non-Leader Keys ``` \ → Toggle Neo-tree (file explorer) K → Hover documentation (LSP) → Clear highlights + close floats gr* → LSP "go to" commands ├── grd → Definition ├── grD → Declaration ├── gri → Implementation ├── grr → References ├── grt → Type definition ├── grn → Rename └── gra → Code action gO → Document symbols gW → Workspace symbols → Window navigation → Debug keys (when available) ``` --- ## Next Steps 1. ✅ **Document current state** (this file) 2. ⏳ **Clean up duplicates** - Remove redundant keymaps 3. ⏳ **Reorganize which-key** - Add icons, proper groups, submenus 4. ⏳ **Add missing keymaps** - Python, Svelte, Buffer, Window, UI operations 5. ⏳ **Update language configs** - Move Crates under `rc`, standardize patterns 6. ⏳ **Implement cheatsheet** - Telescope-based searchable keymap reference 7. ⏳ **Test everything** - Ensure no conflicts, all descriptions visible