tmux Configurations
tmux Configuration File
$ tmux source-file .tmux.conf
unbind C-b
set -g prefix C-a
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
setw -g monitor-activity on
set -g visual-activity on
set-window-option -g window-status-current-bg cyan
# tmux < v2.1
if-shell "[[ `tmux -V | cut -d' ' -f2` -lt 2.1 ]]" "setw -g mode-mouse off"
# tmux >= v2.1
if-shell "[[ `tmux -V | cut -d' ' -f2` -ge 2.1 ]]" "setw -g mouse off"
set -g status-keys vi
setw -g mode-keys vi
set -sg escape-time 0
set -g default-terminal "screen-256color"
setw -g xterm-keys on
bind -r M-h resize-pane -L 5
bind -r M-j resize-pane -D 5
bind -r M-k resize-pane -U 5
bind -r M-l resize-pane -R 5
tmux Basic Commands
$ <Ctrl> a + <Alt> + h/j/k/l # resize pane
$ <Ctrl> a + % # split vertically
$ <Ctrl> a + " # split horizontally
$ <Ctrl> a + <arrow key> # switch pane
$ <Ctrl> a + c # create new window
$ <Ctrl> a + n # move to the next
$ <Ctrl> a + p # move to the previous