# Neovim Keymaps (Current Setup) Leader key: `Space` ## Core Navigation (CoC) | Mode | Key | Action | Plugin | | --- | --- | --- | --- | | Normal | `gd` | Go to definition | coc.nvim | | Normal | `gy` | Go to type definition | coc.nvim | | Normal | `gi` | Go to implementation | coc.nvim | | Normal | `gr` | Go to references | coc.nvim | | Normal | `K` | Hover documentation | coc.nvim | | Normal | `]g` | Next diagnostic | coc.nvim | | Normal | `[g` | Previous diagnostic | coc.nvim | | Normal | `en` | Next diagnostic | coc.nvim | | Normal | `ep` | Previous diagnostic | coc.nvim | | Normal | `a` | `:CocAction` | coc.nvim | | Normal | `cl` | Run codelens action | coc.nvim | ## Completion & Snippets (Insert/Visual) | Mode | Key | Action | Plugin | | --- | --- | --- | --- | | Insert | `` | Next popup item / trigger completion | coc.nvim | | Insert | `` | Previous popup item | coc.nvim | | Insert | `` | Refresh completion | coc.nvim | | Insert | `` | Refresh completion | coc.nvim | | Insert | `` | Expand snippet | coc-snippets | | Insert | `` | Expand/jump snippet | coc-snippets | | Visual | `` | Select snippet placeholder | coc-snippets | ## File / Search / Buffer Flow | Mode | Key | Action | Plugin | | --- | --- | --- | --- | | Normal | `j` | Find files (`:Files`) | fzf.vim | | Normal | `r` | Ripgrep search (`:Rg`) | fzf.vim | | Normal | `b` | Buffers list (`:Buffers`) | fzf.vim | | Normal | `bb` | Buffers list (`:Buffers`) | fzf.vim | | Normal | `bd` | Close current buffer | built-in | | Normal | `bn` | Next buffer | built-in | | Normal | `bp` | Previous buffer | built-in | | Normal | `n` | Next buffer | built-in | | Normal | `p` | Previous buffer | built-in | | Normal | `` | Previous buffer | built-in | | Normal | `bsd` | Close all buffers except alternate/current | custom | | Normal | `f` | `:Lfcd` (open lf) | lf.vim | | Normal | `` | Save file (`:w!`) | built-in | | Normal | `%` | Source current file | built-in | | Normal | `/` | Clear search highlight (`:noh`) | built-in | | Normal | `F` | Format current buffer (`:Format`) | conform.nvim | ## Quick Navigation (Harpoon / Hop) | Mode | Key | Action | Plugin | | --- | --- | --- | --- | | Normal | `'` | Add file to harpoon | harpoon | | Normal | `` | Toggle harpoon quick menu | harpoon | | Normal | `1..9` | Jump to harpoon slot 1..9 | harpoon | | Normal | `h` | Hop to word | hop.nvim | | Normal | `l` | Hop to line | hop.nvim | | Normal | `m` | Toggle maximize window | vim-maximizer | ## Git (coc-git + Telescope/Fugitive) | Mode | Key | Action | Plugin | | --- | --- | --- | --- | | Normal | `gs` | Git status (`:GitStatus`) | telescope custom command | | Normal | `gb` | Blame at cursor | coc-git | | Normal | `gc` | Show commit | coc-git | | Normal | `gdc` | Diff cached | coc-git | | Normal | `gn` | Next changed hunk | coc-git | | Normal | `gp` | Previous changed hunk | coc-git | | Normal | `gg` | Stage hunk | coc-git | | Normal | `gu` | Undo hunk | coc-git | | Normal | `gU` | Unstage hunk | coc-git | | Normal | `gi` | Hunk info | coc-git | | Normal | `go` | Open remote in browser | coc-git | | Normal | `gy` | Copy remote URL | coc-git | | Normal | `gz` | Fold unchanged regions | coc-git | | Normal | `gt` | Toggle git gutters | coc-git | | Normal | `gP` | Push | coc-git | | Normal | `gen` | Previous conflict | coc-git | | Normal | `gep` | Next conflict | coc-git | | Operator/Visual | `ig` / `ag` | Inner/around git hunk textobject | coc-git | ## Debugging (Vimspector, lazy loaded) | Mode | Key | Action | Plugin | | --- | --- | --- | --- | | Normal | `vl` | Launch debugger | vimspector | | Normal | `vr` | Reset debugger | vimspector | | Normal | `ve` | Evaluate expression | vimspector | | Normal | `vw` | Add watch | vimspector | | Normal | `vo` | Show output | vimspector | | Normal/Visual | `vi` | Evaluate under cursor/selection | vimspector | ## Useful habit order 1. Use `j`, `r`, `b` all day. 2. Use `gd`, `gr`, `K`, `]g` for code navigation. 3. Use `gn`, `gp`, `gg`, `gu` for git chunks. 4. Add 2-3 files to Harpoon and jump with `1..3`.