# LazyVim Shortcut Cheatsheet | Shortcut | Function | |-------------|---------------------------------| | **General** | | | `` | Show keybinds menu (after 1s) | | `sk` | Search all keybinds | | `u` | Undo | | `Ctrl+r` | Redo | | `.` | Repeat last operation | | `Esc` | Exit insert mode/cancel | | **File** | | | `ff` | Find file | | `fr` | Recently opened files | | `fn` | New file | | `fs` | Save file | | `fS` | Save as | | `e` | Toggle sidebar | | `E` | Locate current file in sidebar | | **Search** | | | `sg` | Global text search (grep) | | `sw` | Search word under cursor | | `sb` | Search current buffer | | `ss` | Search symbol | | `sS` | Workspace search symbol | | `sh` | Search help documentation | | `sm` | Search marks | | `sr` | Search and replace | | `/` | Search current file | | `n` | Next search result | | `N` | Previous search result | | `*` | Search word under cursor | | **Buffer (Tabs)** | | | `Shift+h` | Previous buffer | | `Shift+l` | Next buffer | | `bb` | Switch to other buffer | | `bd` | Close current buffer | | `bD` | Force close buffer | | `bo` | Close other buffers | | `bp` | Pin buffer | | `bl` | Delete left buffers | | `br` | Delete right buffers | | `[b` | Previous buffer | | `]b` | Next buffer | | **Window/Split** | | | `Ctrl+h` | Move to left window | | `Ctrl+j` | Move to down window | | `Ctrl+k` | Move to up window | | `Ctrl+l` | Move to right window | | `-` | Horizontal split | | `|` | Vertical split | | `wd` | Close current window | | `ww` | Switch window | | `wo` | Close other windows | | `Ctrl+Up` | Increase window height | | `Ctrl+Down` | Decrease window height | | `Ctrl+Left` | Decrease window width | | `Ctrl+Right`| Increase window width | | **Terminal**| | | `Ctrl+/` | Floating terminal | | `ft` | Floating terminal | | `fT` | Terminal in current directory | | `Ctrl+\` | Exit terminal mode | | **Code Navigation** | | | `gd` | Go to definition | | `gD` | Go to declaration | | `gr` | View references | | `gI` | Go to implementation | | `gy` | Go to type definition | | `K` | View documentation hover | | `gK` | Signature help | | `Ctrl+k` | Insert mode signature help | | `]d` | Next diagnostic | | `[d` | Previous diagnostic | | `]e` | Next error | | `[e` | Previous error | | `]w` | Next warning | | `[w` | Previous warning | | **Code Actions** | | | `ca` | Code action | | `cA` | Source code action | | `cr` | Rename | | `cf` | Format file | | `cd` | Line diagnostic info | | `cl` | LSP info | | `cm` | Mason (Manage LSP) | | **Comments**| | | `gcc` | Comment/uncomment current line | | `gc` | Comment selected area | | `gco` | Add comment below | | `gcO` | Add comment above | | `gcA` | Add comment at end of line | | **Git** | | | `gg` | Open lazygit | | `gG` | Lazygit in current directory | | `gf` | Git file list | | `gc` | Git commit history | | `gs` | Git status | | `gb` | Git blame current line | | `gB` | Open repository in browser | | `]h` | Next git hunk | | `[h` | Previous git hunk | | `ghp`| Preview hunk | | `ghs`| Stage hunk | | `ghr`| Reset hunk | | `ghS`| Stage entire file | | `ghR`| Reset entire file | | `ghd`| Diff current file | | **Selection/Edit** | | | `v` | Enter visual mode | | `V` | Line visual mode | | `Ctrl+v` | Block visual mode | | `y` | Yank | | `d` | Delete/Cut | | `p` | Paste | | `P` | Paste before | | `c` | Change | | `x` | Delete character | | `r` | Replace character | | `~` | Toggle case | | `>>` | Increase indent | | `<<` | Decrease indent | | `=` | Auto indent | | `J` | Join lines | | **Movement**| | | `h/j/k/l` | Left/Down/Up/Right | | `w` | Next word start | | `b` | Previous word start | | `e` | Next word end | | `0` | Start of line | | `$` | End of line | | `^` | First non-blank char of line | | `gg` | Start of file | | `G` | End of file | | `{` | Previous paragraph | | `}` | Next paragraph | | `%` | Jump to matching parenthesis | | `Ctrl+d` | Scroll down half page | | `Ctrl+u` | Scroll up half page | | `Ctrl+f` | Scroll down full page | | `Ctrl+b` | Scroll up full page | | `zz` | Center current line | | `zt` | Top current line | | `zb` | Bottom current line | | `Number+G` | Go to specific line | | **Folding** | | | `za` | Toggle fold | | `zA` | Recursively toggle fold | | `zo` | Open fold | | `zc` | Close fold | | `zR` | Open all folds | | `zM` | Close all folds | | **UI** | | | `uf` | Toggle format | | `us` | Toggle spell check | | `uw` | Toggle word wrap | | `ul` | Toggle line numbers | | `uL` | Toggle relative line numbers | | `ud` | Toggle diagnostics | | `uc` | Toggle invisible characters | | `uh` | Toggle highlights | | `un` | Close notifications | | **Exit** | | | `qq` | Quit all | | `qQ` | Force quit all | | `:w` | Save | | `:q` | Quit | | `:wq` | Save and quit | | `:q!` | Force quit without saving |