tmux - miyazi777/vuejs_go_sample GitHub Wiki
# 設定を再読み込みm
# bind C-r source-file ~/.tmux.conf \; display "~/.tmux.conf is reload!"
#
# prefix setting
unbind C-b
set -g prefix C-j
bind C-j send-prefix
# paneの移動
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# 基本設定
## 256色端末を使用する
set -g default-terminal "screen-256color"
set -g terminal-overrides 'xterm:colors=256'
## Escキーの遅延を解消
set -s escape-time 0
## status line を更新する間隔を1秒にする
set-option -g status-interval 30
## ウィンドウのインデックスを1から始める
set -g base-index 1
## ペインのインデックスを1から始める
setw -g pane-base-index 1
## アクティブなペイン以外を青にする
set -g window-style 'bg=#262626'
set -g window-active-style 'bg=#000000'
# status lineの設定
## status-left
set-option -g status-left "\
#[bg=colour148]#[fg=colour234] #S:#I.#P \
#[fg=colour024]#[bg=colour234]"
## status-right
set-option -g status-right "\
#[fg=colour240]#[fg=colour255]#[bg=colour240]\
%Y/%m/%d %H:%M "
## status-center
set -g status-position bottom
set -g status-justify left
set -g status-bg colour234
setw -g window-status-current-format '\
#[fg=colour239]#[bg=colour234]#[bg=colour239]#[fg=colour119]\
#I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]\
#F#[fg=colour239]#[bg=colour234]'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
# 操作系
## マウス操作を有効化
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
## コマンドモードでの選択方法をvim風に変更
set-window-option -g mode-keys vi
setw -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
## クリップボートとの連携
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"