may88seiji
5/25/2017 - 7:24 AM

tmux.conf

tmux.conf

set -g @tpm_plugins '              \
  tmux-plugins/tpm                 \
  tmux-plugins/tmux-yank           \
  tmux-plugins/tmux-open           \
  tmux-plugins/tmux-resurrect      \
  tmux-plugins/tmux-battery        \
  tmux-plugins/tmux-pain-control   \
'

run-shell '~/.tmux/plugins/tpm/tpm'

#マウス操作を有効にする
set-option -g mouse on

# スクロールアップするとコピーモードに入る
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"

# 最後までスクロールダウンするとコピーモードを抜ける
bind-key -n WheelDownPane select-pane -t= \; send-keys -M