Skip to content

Instantly share code, notes, and snippets.

@mehar
Last active November 22, 2017 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehar/e5670a13d185219690bf2571ecca54e8 to your computer and use it in GitHub Desktop.
Save mehar/e5670a13d185219690bf2571ecca54e8 to your computer and use it in GitHub Desktop.
Tmux, Bash, Vi key bindings
Bash – Command Function Description – Bash -- -- Tmux – Command Function Description – TMux
-—— -——- -———————- -—— -——- -———————-
C-Q Clear Line Clears everything on current line C-b Prefix
C-L Clear Screen Clear the Screen Prefix C-h Show Help
C-U Cut Backwards Cut everything backwards to beginning of line Prefix pipe/- Split Pane Vertically/Horizontally
C-K Cut Forwards Cut everything forwards to the end of the line Prefix n/p Next/Prev Window Prefix Arrow – Pane
C-W Cut Word Back Cut one word backwards Prefix C-s Toggle Synchronization
C-Y Paste Paste whatever was cut by the lst cut command Prefix d Detach
C-H Same as backspace Prefix C-c Copy buffer to OSX copy buffer
C-_ Undo the last command Prefix ] Paste Prefix [ – Enter Copy Mode
C-T Swap the last two characters before the cursor Prefix z Pane Zoom Toggle Prefix hjkl – Resize Pane
C-F Char Forward Move cursor one character forward Prefix s Select Sessions Prefix w – Select Window
C-B Char Backward Move cursor one character backward Prefix Space Toggle panes within layouts
Option → Word Forward Move cursor one word forward Prefix q/t Show Panes/Time
Option <- Word Backward Move cursor one word backward Prefix r Reload tmux configuration
Esc T Swap the last two words before the cursor
-—————— -———— -———————————————————————— -- -- -——— -———- -———————————-
vi – Command Function Description – vi -- -- Command Function Description VI
0 Goto start of line $ – Goto end of line List/Kill Session tmux list-sessions/kill-session
| w
Jump by start of words e – Jump to end of words Tmuxinator tmuxinator new/start
| b
Jump backward by words
a Append after the cursor A – Append at the end of the line
:1,$d Delete the whole file
:%s/old/new/g replace, use gc for confirmations

http://vimsheet.com/
https://github.com/0nn0/terminal-mac-cheatsheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment