Created
May 16, 2026 19:23
-
-
Save prime-hacker/18a799428d8209cd0a9cb62fcea6a526 to your computer and use it in GitHub Desktop.
TMUX and VIM Cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =============================================================================== | |
| TMUX & VIM CONFIGURATION CHEATSHEET | |
| =============================================================================== | |
| ------------------------------------------------------------------------------- | |
| 1. TMUX CHEATSHEET | |
| ------------------------------------------------------------------------------- | |
| Your configured Prefix is: Ctrl + a | |
| You must press this combination first before hitting any of the command keys below | |
| (unless explicitly marked as [No Prefix]). | |
| [ Session Management (Terminal Commands) ] | |
| tmux new -s <name> Start a new named tmux session | |
| tmux attach -t <name> Attach/get back to an existing named session | |
| tmux ls List all active tmux sessions | |
| Ctrl + a -> d Detach from the current session (leaves it running in background) | |
| tmux kill-session -t <name> Kill a specific session | |
| [ Plugin Management & Operations ] | |
| Ctrl + a -> I Install Plugins (Fetches TPM plugins: Resurrect, Sensible) | |
| Ctrl + a -> U Update Plugins (Updates your installed TPM extensions) | |
| Ctrl + a -> Alt + u Uninstall Plugins (Cleans out removed plugins from config) | |
| * tmux-resurrect operations: | |
| Ctrl + a -> Ctrl + s Save Environment (Saves all windows, panes, and layouts) | |
| Ctrl + a -> Ctrl + r Restore Environment (Restores your last saved state) | |
| [ Window Management (Tabs) ] | |
| Ctrl + a -> c Create New Window | |
| Ctrl + a -> , Rename Current Window | |
| Ctrl + a -> n Next Window | |
| Ctrl + a -> p Previous Window | |
| [ Pane Management (Splits) ] | |
| Ctrl + a -> | Split Vertically (side-by-side layout) | |
| Ctrl + a -> - Split Horizontally (top-and-bottom layout) | |
| Ctrl + a -> z Zoom Pane (Toggles current pane to fullscreen and back) | |
| Alt + Left Arrow [No Prefix] Move focus to the Left pane | |
| Alt + Right Arrow [No Prefix] Move focus to the Right pane | |
| Alt + Up Arrow [No Prefix] Move focus to the Upper pane | |
| Alt + Down Arrow [No Prefix] Move focus to the Lower pane | |
| [ Copy Mode & macOS Clipboard Navigation ] | |
| Ctrl + a -> [ Enter Copy Mode (Allows scrolling through terminal history) | |
| v (In Copy Mode) Begin selection (like Visual mode in Vim) | |
| r (In Copy Mode) Rectangle toggle (block/column selection) | |
| y (In Copy Mode) Yank selection to internal tmux buffer | |
| Enter (In Copy Mode) Copy to macOS Clipboard via pbcopy & exit | |
| Mouse Left-Drag Highlight text and auto-copy directly to macOS Clipboard | |
| Ctrl + a -> P Paste Buffer (Pastes last text copied inside tmux) | |
| [ Command Line Navigation & Editing (Inside Panes) ] | |
| Ctrl + a Jump straight to the START of the command line | |
| Ctrl + e Jump straight to the END of the command line | |
| Alt + b (or Esc->b) Move BACKWARD by one full word | |
| Alt + f (or Esc->f) Move FORWARD by one full word | |
| Ctrl + w Delete the WORD to the left of the cursor | |
| Ctrl + u Delete from cursor back to the START of the line | |
| Ctrl + k Delete from cursor forward to the END of the line | |
| Ctrl + y Paste (Yank) back the last deleted text block | |
| Ctrl + _ Undo the last keyboard edit | |
| Ctrl + r Reverse History Search (Find past commands instantly) | |
| Ctrl + g Exit out of Reverse History Search mode | |
| ------------------------------------------------------------------------------- | |
| 2. VIM CHEATSHEET | |
| ------------------------------------------------------------------------------- | |
| Your configured Leader key is: , (Comma) | |
| [ Core Actions & File Operations ] | |
| ,w Fast Save (Force-saves current buffer via :w!) | |
| :W Sudo Write (Saves a read-only file with admin privileges) | |
| , <Space> Clear Search Highlights (Clears matched search block color) | |
| ,l Toggle Hidden Characters (Shows/hides tabs [▸] and newlines [¬]) | |
| [ Page Navigation & Scrolling ] | |
| Ctrl + b Move UP by one full screen page | |
| Ctrl + f Move DOWN by one full screen page | |
| Ctrl + u Move UP by half a screen page (Highly Recommended) | |
| Ctrl + d Move DOWN by half a screen page | |
| [ FZF (Fuzzy Finder) Navigation ] | |
| Ctrl + p Search Files (Fuzzy find files in current directory path) | |
| ,b Search Buffers (Fuzzy find through currently open files) | |
| ,h History Search (Fuzzy find recent file history) | |
| ,t Buffer Tags (Search tags inside the active file) | |
| ,T Global Tags (Search tags across the entire workspace) | |
| [ Buffers & Tab Management ] | |
| th Next Tab | |
| tl Previous Tab | |
| tn New Tab | |
| td Close Current Tab | |
| :Bclose Close Current Buffer cleanly without breaking pane layouts | |
| [ Surrounding Text Selection (Visual Mode) ] | |
| Highlight a string of text in Visual Mode (v), then press: | |
| ,1 Enclose text in parentheses: ( text ) | |
| ,2 Enclose text in square brackets: [ text ] | |
| ,3 Enclose text in curly braces: { text } | |
| ,$ Enclose text in double quotes: "text" | |
| ,q Enclose text in single quotes: 'text' | |
| ,e Enclose text in backticks: `text` | |
| [ Auto-Pair Insertion (Insert Mode) ] | |
| Type these short sequences while writing code to quickly inject structures: | |
| $1 Inserts () and places cursor inside | |
| $2 Inserts [] and places cursor inside | |
| $3 Inserts {} and places cursor inside | |
| $4 Inserts a clean multi-line curly bracket block: | |
| { | |
| [Cursor lands here] | |
| } | |
| $q Inserts '' and places cursor inside | |
| $e Inserts "" and places cursor inside | |
| [ Spell Checking ] | |
| ,ss Toggle Spell Check on/off | |
| ,sn Go to Next Misspelled word | |
| ,sp Go to Previous Misspelled word | |
| ,sa Add word under cursor to dictionary | |
| ,s? Suggest corrections for word under cursor | |
| [ Code Navigation (via CoC Engine) ] | |
| gd Go to Definition (Jump to function/variable source) | |
| gy Go to Type Definition | |
| gi Go to Implementation | |
| gr Go to References (Lists all places symbol is called) | |
| Tab Cycles forward through auto-complete suggestions menu | |
| =============================================================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment