# Complete Keymaps Reference **Leader Key: ``** ## Table of Contents - [General](#general) - [Personal Workflow](#personal-workflow) - [Navigation (Snacks Picker)](#navigation-snacks-picker) - [LSP & Code Intelligence](#lsp--code-intelligence) - [File Management](#file-management) - [Editing](#editing) - [Git](#git) - [Debugging (DAP)](#debugging-dap) - [Copilot & AI](#copilot--ai) - [Terminal](#terminal) - [Window Management](#window-management) - [Database](#database) - [LeetCode](#leetcode) - [Text Wrapping](#text-wrapping) - [Folding (nvim-ufo)](#folding-nvim-ufo) - [Session Management](#session-management) - [Commands](#commands) --- ## General | Key | Mode | Action | |-----|------|--------| | `jj` | i | Exit insert mode | | `nh` | n | Clear search highlights | | `Q` | n | Quit all | --- ## Personal Workflow ### File Management | Key | Mode | Action | |-----|------|--------| | `w` | n | Save file | | `q` | n | Quit | | `xa` | n | Save and close all | | `so` | n | Reload nvim (source %) | | `no` | n | Clear search highlight | ### Editing Shortcuts | Key | Mode | Action | |-----|------|--------| | `u` | n | Select entire file | | `4` | n | Duplicate line below | | `+` | n | Increment number | | `-` | n | Decrement number | | `sy` | n | Re-indent entire file | | `` | n | Fast scroll down (10 lines) | | `` | n | Fast scroll up (10 lines) | ### Buffer Management | Key | Mode | Action | |-----|------|--------| | `bd` | n | Close buffer (safe, prompts if modified) | | `bD` | n | Force close buffer | | `` | n | Next buffer | | `` | n | Previous buffer | ### Coding Shortcuts | Key | Mode | Action | |-----|------|--------| | `re` | n | Insert React import at top | | `,` | n | Add comma at end of line | | `;` | n | Add semicolon at end of line | | `xr` | n | Run file with Node.js | ### Quickfix Navigation | Key | Mode | Action | |-----|------|--------| | `xn` | n | Next quickfix item | | `xp` | n | Previous quickfix item | | `xo` | n | Open quickfix list | | `xq` | n | Close quickfix list | | `xf` | n | First quickfix item | | `xl` | n | Last quickfix item | ### Location List Navigation | Key | Mode | Action | |-----|------|--------| | `ln` | n | Next location item | | `lp` | n | Previous location item | | `lo` | n | Open location list | | `lq` | n | Close location list | --- ## Navigation (Snacks Picker) ### File Navigation | Key | Mode | Action | |-----|------|--------| | `ff` | n | Find files | | `fs` | n | Live grep | | `fc` | n | Grep string under cursor | | `fr` | n | Recent files | ### Buffer & Utility Search | Key | Mode | Action | |-----|------|--------| | `fb` | n | Find buffers | | `fh` | n | Help tags | | `fm` | n | Find marks | | `fk` | n | Find keymaps | | `fC` | n | Find commands | ### Git (Telescope Fallback) | Key | Mode | Action | |-----|------|--------| | `fG` | n | Git commits | | `fB` | n | Git buffer commits | | `fg` | n | Git branches | | `gs` | n | Git status | ### TODO Search | Key | Mode | Action | |-----|------|--------| | `ft` | n | Find TODOs (Telescope) | ### Telescope (Unfiltered) | Key | Mode | Action | |-----|------|--------| | `fF` | n | Find files (all, unfiltered) | --- ## LSP & Code Intelligence ### Navigation (fzf-lua) | Key | Mode | Action | |-----|------|--------| | `gd` | n | Go to definition | | `gi` | n | Go to implementation | | `gr` | n | Show references | | `gt` | n | Go to type definition | ### Symbols | Key | Mode | Action | |-----|------|--------| | `ds` | n | Document symbols | | `lw` | n | Workspace symbols | ### Code Actions & Rename | Key | Mode | Action | |-----|------|--------| | `ca` | n | Code actions | | `rn` | n | Rename symbol | | `H` | n | Hover documentation | ### Diagnostics | Key | Mode | Action | |-----|------|--------| | `D` | n | Workspace diagnostics | | `dd` | n | Line diagnostics (float) | | `[d` | n | Previous diagnostic | | `]d` | n | Next diagnostic | ### Formatting | Key | Mode | Action | |-----|------|--------| | `mm` | n, v | Format with conform | --- ## File Management ### File Explorer (nvim-tree) | Key | Mode | Action | |-----|------|--------| | `e` | n | Toggle file explorer | Inside nvim-tree: | Key | Action | |-----|--------| | `o` | Open file | | `s` | Open in vertical split | | `i` | Open in horizontal split | | `a` | Create new file | | `r` | Rename | | `d` | Delete | | `x` | Cut | | `y` | Copy | | `p` | Paste | | `u` | Go up one directory | | `f` | Change root to node | ### Buffer Cycling | Key | Mode | Action | |-----|------|--------| | `` | n | Next buffer | | `` | n | Previous buffer | --- ## Editing ### Comments (Comment.nvim) | Key | Mode | Action | |-----|------|--------| | `/` | n, v | Toggle comment | | `gcc` | n | Toggle line comment | | `gc` | n | Toggle comment | | `gco` | n | Insert comment below | | `gcO` | n | Insert comment above | | `gcA` | n | Insert comment at end of line | | `gb` | n | Toggle block comment | | `gbc` | n | Toggle block comment | ### Substitute (substitute.nvim) | Key | Mode | Action | |-----|------|--------| | `sub` | n | Substitute with motion | | `sl` | n | Substitute line | | `S` | n | Substitute to end of line | ### Surround (nvim-surround) | Key | Mode | Action | |-----|------|--------| | `sa` | n | Add surrounding | | `sd` | n | Delete surrounding | | `sr` | n | Replace surrounding | | `ys` | n | Add surrounding (classic) | | `yss` | n | Add surrounding to line | | `yS` | n | Add surrounding on new lines | | `ySS` | n | Add surrounding to line on new lines | ### Console.log | Key | Mode | Action | |-----|------|--------| | `cl` | n | Insert console.log snippet | ### TODO Comments | Key | Mode | Action | |-----|------|--------| | `xt` | n | Open TODOs in Trouble | --- ## Git ### LazyGit | Key | Mode | Action | |-----|------|--------| | `gg` | n | Open LazyGit | ### Gitsigns (buffer-local) | Key | Mode | Action | |-----|------|--------| | `]h` | n | Next hunk | | `[h` | n | Previous hunk | | `hs` | n, v | Stage hunk | | `hr` | n, v | Reset hunk | | `hS` | n | Stage buffer | | `hR` | n | Reset buffer | | `hu` | n | Undo stage hunk | | `hp` | n | Preview hunk | | `hb` | n | Blame line (full) | | `hB` | n | Toggle line blame | | `hd` | n | Diff this | | `hD` | n | Diff this ~ | | `ih` | o, x | Select hunk (text object) | ### Trouble (Diagnostics Panel) | Key | Mode | Action | |-----|------|--------| | `Xx` | n | Toggle Trouble | | `Xw` | n | Workspace diagnostics | | `Xd` | n | Document diagnostics | | `Xl` | n | Location list | | `Xq` | n | Quickfix list | --- ## Debugging (DAP) ### Debug Control | Key | Mode | Action | |-----|------|--------| | `dcr` | n | Start/Continue debugging | | `do` | n | Step over | | `di` | n | Step into | | `dot` | n | Step out | | `db` | n | Toggle breakpoint | | `dB` | n | Set conditional breakpoint | | `dr` | n | Open REPL | | `dl` | n | Run last debug config | | `du` | n | Toggle DAP UI | | `dq` | n | Stop debugging | | `drt` | n | Reset DAP UI layout | ### Debug Navigation | Key | Mode | Action | |-----|------|--------| | `dcf` | n | List/select DAP configs | | `dcb` | n | List breakpoints | | `dco` | n | DAP Commands (REPL) | ### Dynamic Attach | Key | Mode | Action | |-----|------|--------| | `jd` | n | Debug attach (dynamic port, Bun/Node) | ### Project Run/Debug | Key | Mode | Action | |-----|------|--------| | `pr` | n | Run project | | `pd` | n | Debug project | | `p` | n | Run project (quick) | --- ## Copilot & AI ### Copilot Commands | Key | Mode | Action | |-----|------|--------| | `cp` | n | Open Copilot panel | | `cD` | n | Disable Copilot | | `cE` | n | Enable Copilot | | `cs` | n | Copilot status | ### Copilot Panel Navigation | Key | Mode | Action | |-----|------|--------| | `[[` | n | Previous suggestion (in panel) | | `]]` | n | Next suggestion (in panel) | | `` | n | Accept suggestion (in panel) | | `rp` | n | Refresh panel | | `` | n | Open panel | ### Inline Suggestions | Key | Mode | Action | |-----|------|--------| | `]` | i | Next suggestion | | `[` | i | Previous suggestion | | `` | i | Dismiss suggestion | ### CopilotChat | Key | Mode | Action | |-----|------|--------| | `cc` | n | Toggle CopilotChat window | | `cq` | n | Quick chat (whole buffer) | | `ce` | n, v | Explain code | | `cr` | n, v | Review code | | `cf` | n, v | Fix code | | `co` | n, v | Optimize code | | `cd` | n, v | Generate docs | | `ct` | n, v | Generate tests | | `cm` | n | Select model | ### Copilot Chat (Visual, personal shortcuts) | Key | Mode | Action | |-----|------|--------| | `zn` | v | Rename variable | | `zc` | n | Open Copilot Chat | | `ze` | v | Explain code | | `zr` | v | Review code | | `zf` | v | Fix code | | `zo` | v | Optimize code | | `zd` | v | Generate docs | --- ## Terminal ### ToggleTerm | Key | Mode | Action | |-----|------|--------| | `tf` | n | Float terminal | | `th` | n | Horizontal split terminal | | `tv` | n | Vertical split terminal | ### Terminal Mode | Key | Mode | Action | |-----|------|--------| | `` | t | Switch to left window | | `` | t | Close terminal | | `` | t | Escape terminal mode | --- ## Window Management ### Splits | Key | Mode | Action | |-----|------|--------| | `sv` | n | Split vertical | | `sh` | n | Split horizontal | | `se` | n | Make splits equal | | `sx` | n | Close current split | ### Tabs | Key | Mode | Action | |-----|------|--------| | `to` | n | Open new tab | | `cx` | n | Close current tab | | `tn` | n | Next tab | | `tp` | n | Previous tab | | `tt` | n | Open buffer in new tab | ### Resize Splits | Key | Mode | Action | |-----|------|--------| | `` | n | Increase width (+5) | | `` | n | Decrease width (-5) | | `` | n | Increase height (+5) | | `` | n | Decrease height (-5) | --- ## Database ### vim-dadbod UI | Key | Mode | Action | |-----|------|--------| | `Du` | n | Toggle Database UI | | `Da` | n | Add DB connection | | `Df` | n | Find DB buffer | | `De` | n, v | Execute query | | `Dw` | n | Save query | | `Dr` | n | Rename DB buffer | ### Quick Connections | Key | Mode | Action | |-----|------|--------| | `Dp` | n | PostgreSQL Docker | | `Dm` | n | MongoDB local | | `DM` | n | MongoDB Docker | | `Di` | n | Redis local | | `DI` | n | Redis Docker | ### Redis & MongoDB (plugins.lua) | Key | Mode | Action | |-----|------|--------| | `rds` | n | Open Redis | | `rdk` | n | Show Redis keys | | `rdi` | n | Redis info | | `mdb` | n | Open MongoDB | | `mdc` | n | Connect MongoDB | | `mdd` | n | Disconnect MongoDB | --- ## LeetCode | Key | Mode | Action | |-----|------|--------| | `lr` | n | Run code | | `ls` | n | Submit code | | `ld` | n | Daily challenge | | `ll` | n | List problems | | `lc` | n | Open console | | `lu` | n | Update cookie | | `lh` | n | Show hints | | `lls` | n | Get latest submission | --- ## Text Wrapping ### Wrapping Controls | Key | Mode | Action | |-----|------|--------| | `tw` | n | Toggle line wrapping | | `tl` | n | Toggle line break | | `tx` | n | Show 80-char column guide | | `tH` | n | Hide column guide | ### Format Text | Key | Mode | Action | |-----|------|--------| | `tpg` | n | Format paragraph | | `tf` | v | Format selection | | `tF` | n | Format entire file | ### Text Width | Key | Mode | Action | |-----|------|--------| | `t80` | n | Set textwidth to 80 | | `t100` | n | Set textwidth to 100 | | `t120` | n | Set textwidth to 120 | | `t0` | n | Disable textwidth | ### Auto-wrap Controls | Key | Mode | Action | |-----|------|--------| | `ta` | n | Enable auto-wrap text | | `tA` | n | Disable auto-wrap text | | `tc` | n | Enable auto-wrap comments | | `tC` | n | Disable auto-wrap comments | | `ti` | n | Toggle break indent | | `ts` | n | Show break indicator | | `tS` | n | Hide break indicator | --- ## Folding (nvim-ufo) | Key | Mode | Action | |-----|------|--------| | `zR` | n | Open all folds | | `zM` | n | Close all folds | | `zr` | n | Open folds except kinds | | `zm` | n | Close folds by level | | `K` | n | Peek fold or LSP hover | --- ## Session Management | Key | Mode | Action | |-----|------|--------| | `sS` | n | Session: Save | | `sR` | n | Session: Restore | --- ## Commands | Command | Description | |---------|-------------| | `:Lazy` | Plugin manager | | `:Mason` | LSP server manager | | `:Navbuddy` | Code navigation | | `:Outline` | Symbol outline | | `:Neogit` | Git interface | | `:DiffviewOpen` | Diff view | | `:GrugFar` | Search & replace | | `:Octo` | GitHub PRs/issues | | `:OverseerRun` | Run tasks | | `:ZenMode` | Distraction-free mode | | `:Hardtime toggle` | Toggle vim training | | `:TSJToggle` | Toggle split/join | | `:WordCount` | Show word count (excluding symbols) | | `:RunProject` | Run project command | | `:DebugProject` | Debug project command | --- *Last Updated: February 10, 2026*