# Keybindings Cheatsheet Leader key: `` ## Navigation | Key | Description | |-----|-------------| | `` | Navigate between splits/tmux panes | | `ff` | Find files | | `` | Find files (alt) | | `fr` | Recent files | | `fb` | Browse buffers | | `e` | File explorer | | `s` | Flash jump (in normal mode) | | `S` | Flash treesitter | ## Harpoon (Quick File Access) | Key | Description | |-----|-------------| | `H` | Add file to harpoon | | `h` | Toggle harpoon menu | | `1-9` | Jump to harpoon file 1-9 | ## Search | Key | Description | |-----|-------------| | `sg` | Grep (search text) | | `sw` | Search word under cursor | | `ss` | Search symbols | | `sS` | Search symbols (workspace) | | `/` | Search in buffer | | `sr` | Search and replace (grug-far) | ## LSP / Code | Key | Description | |-----|-------------| | `gd` | Go to definition | | `gr` | Go to references | | `gI` | Go to implementation | | `gy` | Go to type definition | | `K` | Hover documentation | | `gK` | Signature help | | `ca` | Code actions | | `cr` | Rename symbol | | `cf` | Format document | | `cd` | Line diagnostics | | `cS` | Reload snippets | | `]d` / `[d` | Next/prev diagnostic | | `]e` / `[e` | Next/prev error | | `]w` / `[w` | Next/prev warning | ## Git | Key | Description | |-----|-------------| | `gg` | Lazygit (if installed) | | `gd` | Diffview: Open | | `gD` | Diffview: Close | | `gf` | Diffview: File history | | `gF` | Diffview: Branch history | | `gm` | Diffview: Compare to main | | `gB` | Toggle git blame | | `go` | Open commit in browser | | `gy` | Copy commit URL | ### GitHub (Octo) | Key | Description | |-----|-------------| | `gpl` | List PRs | | `gpc` | Create PR | | `gpo` | Checkout PR | | `gpb` | Open PR in browser | | `gpm` | Merge PR | | `gil` | List issues | | `gic` | Create issue | | `grs` | Start review | | `grr` | Resume review | | `grc` | Submit review | ## Testing | Key | Description | |-----|-------------| | `tt` | Run nearest test | | `tf` | Run file tests | | `ta` | Run all tests | | `tl` | Run last test | | `tS` | Stop tests | | `td` | Debug nearest test | | `tD` | Debug file tests | | `tw` | Toggle watch (file) | | `ts` | Toggle summary | | `to` | Show output | | `tO` | Toggle output panel | | `]t` / `[t` | Next/prev failed test | ## Debugging (DAP) | Key | Description | |-----|-------------| | `db` | Toggle breakpoint | | `dB` | Breakpoint with condition | | `dc` | Continue | | `dC` | Run to cursor | | `di` | Step into | | `do` | Step over | | `dO` | Step out | | `dp` | Pause | | `dt` | Terminate | | `du` | Toggle DAP UI | | `de` | Evaluate expression | ## Database | Key | Description | |-----|-------------| | `Du` | Toggle DBUI | | `Da` | Add DB connection | | `Df` | Find DB buffer | | `Dr` | Rename DB buffer | | `Dl` | Last query info | ## REST Client | Key | Description | |-----|-------------| | `Rs` | Send request | | `Ra` | Send all requests | | `Rr` | Replay last request | | `Ri` | Inspect request | | `Rt` | Toggle headers/body | | `Rc` | Copy as cURL | | `Re` | Select environment | | `]r` / `[r` | Next/prev request | ## AI Assistant (opencode.nvim) | Key | Description | |-----|-------------| | `kk` | Toggle opencode | | `ka` | Ask opencode | | `kA` | Ask about current file | | `kn` | New session | | `ke` | Explain code near cursor | | `kE` | Explain selection (visual) | | `kr` | Review file | | `kg` | Review git diff | | `kf` | Fix diagnostics | | `ko` | Optimize selection (visual) | | `kR` | Refactor selection (visual) | | `kd` | Document selection (visual) | | `kt` | Test selection (visual) | | `kh` | Ask about harpooned files | ## Session Management | Key | Description | |-----|-------------| | `qs` | Restore session | | `ql` | Restore last session | | `qd` | Don't save session | | `qS` | Select session | ## Background Tasks (Executor) | Key | Description | |-----|-------------| | `Brr` | Run task | | `Brs` | Set command | | `Bll` | Show last task | ## Window Management | Key | Description | |-----|-------------| | `ww` | Other window | | `wd` | Delete window | | `w-` | Split below | | `w\|` | Split right | | `wm` | Maximize window | ## Buffers | Key | Description | |-----|-------------| | `` | Previous buffer | | `` | Next buffer | | `bd` | Delete buffer | | `bo` | Delete other buffers | ## Misc | Key | Description | |-----|-------------| | `l` | Lazy (plugin manager) | | `L` | Lazy extras | | `fn` | New file | | `xl` | Location list | | `xq` | Quickfix list | | `xt` | Todo list | | `uz` | Toggle zen mode |