diff --git a/.tmux.conf b/.tmux.conf index 395b65f..4b74863 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -4,12 +4,22 @@ bind-key C-t send-prefix unbind-key C-b +# --- key bindings --- +# emacs keybindings +set -g mode-keys emacs + +# history size +set-option -g history-limit 100000 + # --- status bar --- # normal set -g status-fg white set -g status-bg green set -g status-attr bold +# window settings +set-option -g renumber-windows on + # status line left side # status line right side @@ -27,8 +37,47 @@ set -g pane-active-border-bg default set -g pane-active-border-fg green -# window settings -set-option -g renumber-windows on +# --- switch a pane --- +# Prefix + C-p : select a upper pane +# Prefix + C-n : select a bottom pane +# Prefix + C-b : select a left pane +# Prefix + C-f : select a right pane +# Up +bind -r C-p select-pane -U +# Down +bind -r C-n select-pane -D +# Left +bind -r C-b select-pane -L +# Right +bind -r C-f select-pane -R +# --- resize pane --- +# -r means command repeatable, +# +# ex) Prefix + +++ means resize a pane of top +3. +# +# Prefix + + : resize a pane of top +# Prefix + - : resize a pane of bottom +# Prefix + < : resize a pane of left +# Prefix + > : resize a pane of right +# Up +bind -r + resize-pane -U 1 +# Down +bind -r - resize-pane -D 1 +# Left +bind -r < resize-pane -L 1 +# Right +bind -r > resize-pane -R 1 + +# --- others --- +# reload config file. +bind R source-file ~/.tmux.conf \; display-message "source-file done" + +# --- plugins --- # install tmux plugin to save and restore sessions. +# prefix + Ctrl-s : Save +# prefix + Ctrl-r : Restore run-shell ~/tmux-resurrect/resurrect.tmux + +# auto saving current windows every 60 seconds. +set -g @continuum-save-interval '60'