nicoorfi
11/29/2019 - 2:12 PM

.tmux.conf

# set prefix to C-a
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

# scroll-back buffer size
set-option -g history-limit 10000

# vi mode
set-window-option -g mode-keys vi

# copy with v and y
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel

# vim-like pane navigation
bind-key -r -T prefix h select-pane -L
bind-key -r -T prefix j select-pane -D
bind-key -r -T prefix k select-pane -U
bind-key -r -T prefix l select-pane -R

# vim-like pane resizing
bind-key -r -T prefix C-k resize-pane -U
bind-key -r -T prefix C-j resize-pane -D
bind-key -r -T prefix C-h resize-pane -L
bind-key -r -T prefix C-l resize-pane -R

# enter copy mode with C-a K
bind-key -T prefix K copy-mode

# paste buffer with L
bind-key -T prefix L paste-buffer

# reload .tmux.conf with C-a r
bind r source-file ~/.tmux.conf \; display-message ".. config reloaded"

# set status bar background to terminal color
set -g status-bg colour44
set -g status-fg black

# set active pane border color
set -g pane-active-border-style fg=cyan,bold

# set message for the right site of the status bar
set -g status-right '%Y/%m/%d - %H:%M:%S '

# turn status bar off
set -g status off

# term mode
set -g default-terminal "screen-256color"

# set window slpit keys
bind-key -r -T prefix       /                     split-window -h
bind-key -r -T prefix       -                     split-window -v