Hello World

Be Happy!

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-C in 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 via clipboard=unnamed)
  • p / P — Paste after / before
  • "+y "+p — Explicit system-clipboard yank / paste
  • dd cc x — Delete line / change line / delete char
  • v V Ctrl-v — Visual / visual-line / visual-block select
  • /pattern n N — Search, next, previous
  • :%s/a/b/g — Replace all a with b in file
  • gg G — Top / bottom of file
  • :w :q :wq :q! — Write / quit / write-quit / force-quit
  • u Ctrl-r — Undo / redo
  • :source ~/.vimrc — Reload vimrc from inside Vim (never source it 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
  • p P — 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/:RG use rg and :Files prefers fd if FZF_DEFAULT_COMMAND is set — both are installed. FZF_DEFAULT_COMMAND is currently unset, so :Files falls back to the system find. To make it use fd, 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 — Fuzzy cd into 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 filecat with 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 matching foo
  • 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 (then v select, y copy to clipboard)
  • prefix + Ctrl-s / Ctrl-r — tmux-resurrect save / restore
  • prefix + I — Install TPM plugins
Note: Ctrl/Alt-arrow resize does not work here — Ghostty strips the modifier. Use H/J/K/L (see macbook-setup.md for 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'
#vim (3) #fzf (1) #tmux (2) #cli (1) #cheatsheet (1)
List