Cheatography
https://cheatography.com
This is a Cheatsheet from !Oh my tmux and my personal tmux edition in the .tmux.conf
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Outside Sessions
|
tmux: start a new termux session |
|
list-sessions: show listed session |
tmux attach [-t foo]
tmux a [-t foo]
|
attach-session: attach to target session foo
|
|
kill-server: tmux kill all sessions |
tmux kill-session [-t target]
|
kill-session: destroy the target
session |
|
new-session: start session named as foo
|
|
rename-session: rename the target session as bar
. |
|
list-commands: list all commands supported |
to more cmds
about session check the Official Manual [link]
.tmux.conf
#setting prompt color
set -g default-terminal "xterm-256color"
TMUX_CONF="~/.tmux.conf"
TMUX_EDITOR="vim"
unbind C-b # disable default <prefix>
set -g prefix C-a # <prefix> as C-a
bind a send-prefix # <prefix>a as normal C-a
bind C-a send-prefix # <prefix>C-a as normal C-a
set -g base-index 1 # start at 1
setw -g pane-base-index 1
set -g mouse 1
# =========VIM=========
#Move to the panel as VIM -> <prefix>hjkl
bind h select-pane -L # <prefix>h select left-pane
bind j select-pane -D # <prefix>j select down-pane
bind k select-pane -U # <prefix>k select up-pane
bind l select-pane -R # <prefix>l select right-pane
bind C-h previous-window # M-h select previous-window
bind C-l next-window # M-l select next-window
bind r source-file $TMUX_CONF \; display "$TMUX_CONF reloaded" # <prefix>r as reload config_file
bind e new-window -n "$TMUX_CONF" "$TMUX_EDITOR $TMUX_CONF && tmux source $TMUX_CONF" # <prefix>e open config_file
bind '%' split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# =======TESTING=======
|
.tmux.conf is the configuration file and you can create it in the $HOME directory ~/.tmux.conf
download last version link
|
|
Shortcuts tmux
|
◫ Split terminal Vertically |
|
⊟ Split terminal Horizontally |
|
◨ Move between panels |
|
show/select panel [number]
|
|
Reorder panels |
|
Swap Panel |
|
Close panel C-a
+ :kill-panel
|
|
Toogle Maximaize Panel |
|
Create new window |
|
move between windows |
|
|
|
Previous window |
|
Close window C-a
+ :kill-window
|
|
Toggle mouse mode |
|
Open ~/.tmux.conf.local
|
|
|
|
Enter into copy-mode |
|
go to tmux command-line |
|
|
list of commands in commad-line
|
Kill all instances of tmux |
|
|
|
|
|