Skip to content

Instantly share code, notes, and snippets.

@lvidarte
Created September 24, 2014 17:48
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 lvidarte/eb1427df488e29fffcd9 to your computer and use it in GitHub Desktop.
Save lvidarte/eb1427df488e29fffcd9 to your computer and use it in GitHub Desktop.
tmux cheatsheet
1.
tmux
exit [C-d]
Prefix d # detaches from session
2. Sessions
tmux new -s [name]
tmux attach
tmux ls
tmux attach -t [name]
tmux kill-sessi on -t [name]
3. Windows
Prefix c # create a window
Prefix n # next window
Prefix p # previous window
Prefix , # rename window
Prefix [0-9] # go to n window
Prefix f # find a window by name
4. Panes
Prefix % # split vertically
Prefix " # split horizontally
Prefix o # cycle through panes
Prefix arrows # move around panes
Prefix x # kill pane
Prefix z # toggle maximize pane
Prefix { # move current pane left
Prefix } # move current pane right
Prefix q # show pane numbers (and type fast)
Prefix spacebar # cycle through pane layouts
5. Panes layouts
* even-horizontal
* even-vertical
* main-horizontal
* main-vertical
* tiled
6. Command Mode
Prefix :
Prefix :new-window -n py python
Prefix :split-window -h top
Prefix :split-window -v
Prefix :select-layout even-vertical
Prefix :next-layout
Prefix :setw synchronize-panes
Prefix :break-pane
Prefix :source-file ~/.tmux.conf # reload conf
7. Configuring tmux: ~/.tmux.conf
set -g prefix C-a # remapping command prefix
bind | split-window -h
bind - split-window -v
bind h resize-pane -L 5
bind j resize-pane -D 5
bind k resize-pane -U 5
bind l resize-pane -R 5
8. Join Pane
tmux join-pane -s 0:1.2 -t 1:2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment