You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB
Markdown

# Cheats
## Motions
- `cgn` change word under cursor, then `.` to repeat on next match
- `gc` comment motion (e.g. `gc3j`, `gcap`)
- `gcc` toggle comment on current line
## fzf
- `<leader>f` find files
- `<leader>g` live grep
- `<leader>b` buffers
- `<leader>o` old files
- `<leader>s` grep word under cursor across project
## Terminal
- `<C-t>` toggle terminal
- `<C-\><C-n>` exit terminal mode (back to normal mode)
## Oil
- `-` open oil (current file's directory)
- `<leader>-` go to cwd root
- `-` go up a directory (inside oil)
- `<CR>` open file/directory
- `g.` toggle hidden files
## Clipboard
- `<leader>y` yank to system clipboard (normal/visual)
- `<leader>p` paste from system clipboard
## General
- `<leader>h` clear search highlight
- `:Cheats` open this file
## System Dependencies
- `fzf` fuzzy finder binary (required by fzf-lua)
- `rg` ripgrep — required for live grep and grep word (`<leader>g`, `<leader>s`)
- `fd` faster file finding (optional, fzf-lua uses it automatically if present)
- `wl-clipboard` / `xclip` system clipboard on Linux (Wayland / X11)
Arch: `sudo pacman -S fzf ripgrep fd wl-clipboard`
macOS: `brew install fzf ripgrep fd`