Shortcuts Cheat Sheet — Vim, fzf, tmux & CLI Tools
Shortcuts Cheat Sheet — This Machine
Reflects what is actually installed and configured on this Mac (verified from ~/.vimrc, ~/.zshrc, ~/.tmux.conf, and Homebrew). Not a generic list.
-
Vim: 9.2 (Homebrew,
+clipboard) at/opt/homebrew/bin/vim -
Vim plugins (vim-plug, in
~/.vim/plugged):nerdtree,fzf,fzf.vim -
CLI tools:
fzf,rg(ripgrep),fd,bat,zoxide,eza,lazygit,starship -
Shell: zsh + Oh My Zsh (theme via Starship), plugins line
plugins=(git)
⚠️ fzf shell key-bindings are NOT enabled on this machine.Ctrl-R/Ctrl-T/Alt-Cin the terminal will not use fzf until you run the installer (see [Enable fzf shell integration](#enable-fzf-shell-integration-not-yet-done)). The Vim fzf commands below do work.
Vim — general (from your ~/.vimrc)
Your ~/.vimrc sets: number, relativenumber (hybrid line numbers), and clipboard=unnamed (yanks go to the macOS system clipboard).
Key / Action
-
y/yy— Yank (copies to macOS clipboard viaclipboard=unnamed) -
p/P— Paste after / before -
"+y"+p— Explicit system-clipboard yank / paste -
ddccx— Delete line / change line / delete char -
vVCtrl-v— Visual / visual-line / visual-block select -
/patternnN— Search, next, previous -
:%s/a/b/g— Replace allawithbin file -
ggG— Top / bottom of file -
:w:q:wq:q!— Write / quit / write-quit / force-quit -
uCtrl-r— Undo / redo -
:source ~/.vimrc— Reload vimrc from inside Vim (neversourceit in zsh)
Clipboard check: in Vim press yy, quit, run pbpaste in the shell — the line prints.
NERDTree (file explorer)
No custom mapping is set in your ~/.vimrc, so use the commands directly:
Command / Key / Action
-
:NERDTree— Open the file tree -
:NERDTreeToggle— Toggle the tree open/closed -
:NERDTreeFind— Reveal current file in the tree -
o/Enter— Open file / expand dir (inside tree) -
t— Open in new tab -
s/i— Open in vertical / horizontal split -
pP— Jump to parent / root -
R— Refresh the tree -
m— Menu (create/delete/move file) -
q— Close the tree
Tip: to open the tree with a single key, add to~/.vimrc:nnoremap <C-n> :NERDTreeToggle<CR>
fzf inside Vim (fzf.vim)
These commands are provided by the installed fzf.vim (verified from the plugin). They open a fuzzy-finder window; type to filter, Enter to open.
Command / What it fuzzy-finds
-
:Files [dir]— Files under dir (with preview) -
:GFiles— Git-tracked files -
:GFiles?— Git status (changed files) -
:Buffers— Open buffers -
:Rg [pattern]— ripgrep content search (with preview) -
:RG [pattern]— ripgrep, re-runs on every keystroke -
:Ag [pattern]— silver-searcher content search -
:Lines/:BLines— Lines in all buffers / current buffer -
:Tags/:BTags— ctags in project / current buffer -
:Marks/:Jumps/:Changes— Marks / jump list / change list -
:History— Recently opened files (:oldfiles) -
:Commits/:BCommits— Git commits (repo / current buffer) -
:Commands— Vim commands -
:Maps— Normal-mode mappings -
:Windows— Open windows -
:Colors— Color schemes -
:Helptags— Help tags
Inside any fzf window:
Key / Action
-
Ctrl-j/Ctrl-k(or arrows) — Move selection down / up -
Enter— Open in current window -
Ctrl-t— Open in new tab -
Ctrl-x— Open in horizontal split -
Ctrl-v— Open in vertical split -
Tab/Shift-Tab— Multi-select (where supported) -
Esc/Ctrl-c— Cancel
:Rg/:RGusergand:FilesprefersfdifFZF_DEFAULT_COMMANDis set — both are installed.FZF_DEFAULT_COMMANDis currently unset, so:Filesfalls back to the systemfind. To make it usefd, see the env-var tip below.
fzf in the terminal (shell)
⚠️ Not active yet on this machine — see the enable section below. Once enabled:
Key / Action
-
Ctrl-r— Fuzzy-search command history -
Ctrl-t— Fuzzy-pick file/dir, insert path at cursor -
Alt-c— Fuzzycdinto a subdirectory -
**<Tab>— Fuzzy completion (e.g.vim <Tab>,cd <Tab>)
ripgrep (rg) & fd — standalone
Command / Action
-
rg pattern— Recursive content search (respects.gitignore) -
rg -i pattern— Case-insensitive -
rg -t rb pattern— Only Ruby files (-t js,-t py, …) -
rg -l pattern— Only list matching file names -
rg -A 3 -B 3 pattern— Show 3 lines after/before match -
fd name— Find files/dirs by name (respects.gitignore) -
fd -e rb— Find by extension -
fd -H name— Include hidden files
bat, eza, zoxide, lazygit
Command / Action
-
bat file—catwith syntax highlighting + line numbers -
bat -p file— Plain (no decorations) -
ls/ll/lt— eza aliases (from~/.zshrc): icons / long+git / tree -
z foo— zoxide: jump to a "frecent" dir matchingfoo -
zi— zoxide interactive pick (fzf-style) -
lazygit— Git TUI (stage/commit/branch/rebase visually)
lazygit essentials (inside the TUI): Space stage, c commit, P push, p pull, b branches, Tab switch panels, ? help, q quit.
tmux (from your ~/.tmux.conf)
Prefix is Ctrl-b. Copy-mode is vi-style; yanks pipe to pbcopy.
Key / Action
-
prefix + o— tmux-sessionx fuzzy session switcher -
prefix + H/J/K/L— Resize pane left/down/up/right by 5 (repeatable) -
prefix + z— Zoom pane fullscreen / restore -
prefix + [— Enter copy-mode (thenvselect,ycopy to clipboard) -
prefix + Ctrl-s/Ctrl-r— tmux-resurrect save / restore -
prefix + I— Install TPM plugins
Note:Ctrl/Alt-arrowresize does not work here — Ghostty strips the modifier. UseH/J/K/L(seemacbook-setup.mdfor the full explanation).
Enable fzf shell integration (not yet done)
To turn on Ctrl-R / Ctrl-T / Alt-C in the terminal:
$(brew --prefix)/opt/fzf/install
Answer "y" to the key-bindings prompt. It appends a source ...fzf.zsh line to ~/.zshrc. Reload with source ~/.zshrc (or open a new shell).
Optional: make fzf/:Files use fd + nicer defaults
Add to ~/.zshrc:
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'