Hotkeys for different programs
There are a lot of keyboard shortcuts for Terminal which are the same as Emacs.
Hotkeys Description
Ctrl+f Move cursor one character to the right
Ctrl+b Move cursor one character to the left
Alt+f Move cursor one word to the right
Alt+b Move cursor one word to the left
Ctrl+a Move cursor to start of the line
Ctrl+e Move cursor to end of the line
Ctrl+u Cut everything from line start to cursor
Ctrl+k Cut everything from the cursor to end of the line
Alt+d Cut the current word after the cursor
Ctrl+w Cut the current word before the cursor
Ctrl+y Paste the previous cut text
Alt+y Paste the second latest cut text
Ctrl+p Move to the previous line
Ctrl+n Move to the next line
Ctrl+s Search
Ctrl+r Reverse search
Ctrl+j End search
Ctrl+g Abort search (restores original line)
Alt+r Restores all changes made to line
Tab Auto-complete a name
Alt+? List all possible completions
Alt+* Insert all possible completions
Hotkeys Description
C-u NUMBER + shift tab fold all blocks below certain level
Shortcuts
Key(s) Description
General Commands
ctrl+b ? shows a list of all commands (`q`closes the list)
ctrl+b : enter a tmux command
Working with Windows
ctrl+b c creates a new window
ctrl+b , rename current window
ctrl+b p switch to previous window
ctrl+b n switch to next window
ctrl+b w list windows (and then select with arrow keys)
Working with Panes
ctrl+b % split window vertically
ctrl+b ” split window horizontally <br> requires `bind - split-window -v` in our `.tmux.conf`
ctrl+b → go to right pane
ctrl+b ← go to left pane
ctrl+b ↑ go to upper pane
ctrl+b ↓ go to lower pane
Working with Sessions
ctrl+b d detach from session
Commands
Command Description
tmux new-session -s <SESSION NAME> creates a new session with name `<SESSION NAME>`
tmux ls lists all currently running tmux sessions
tmux attach-session -t <SESSION NAME> attach to the session called `<SESSION NAME>`