-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
87 lines (69 loc) · 2.75 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# 設定ファイルをリロードする
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# tmuxのPrefix
set -g prefix C-t
unbind C-b
# ウィンドウのインデックスを1から始める
set -g base-index 1
# ペインのインデックスを1から始める
setw -g pane-base-index 1
# new window
bind c new-window -c "#{pane_current_path}"
# | でペインを縦に分割する
bind | split-window -h -c "#{pane_current_path}"
# - でペインを横に分割する
bind - split-window -v -c "#{pane_current_path}"
# ペインを移動する
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 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
# 並列実行のトグル
bind e setw synchronize-panes \; display "synchronize-panes #{?pane_synchronized,on,off}"
# Escの遅延を解消
set -s escape-time 0
## リフレッシュの間隔を設定する(デフォルト 15秒)
set -g status-interval 1
# アクティブペインのみ白っぽくする.
set -g window-style 'bg=colour234'
set -g window-active-style 'bg=colour16'
## ヴィジュアルノーティフィケーションを有効にする
setw -g monitor-activity on
set -g visual-activity on
# マウスでスクロールする
set -g mouse on
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# vi mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi Escape send-keys -X cancel
if-shell "uname | grep -q Darwin" \
'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"'
if-shell "uname | grep -q Darwin" \
'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"'
if-shell "type xsel" \
'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -bi"'
if-shell "type xsel" \
'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -bi"'
if-shell "type xsel" \
'bind ] run-shell \
"xsel -ob | xargs -0 -I{} tmux set-buffer -- {} && tmux paste-buffer"'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @continuum-restore 'on' #tmuxスタート時に自動で復元
set -g @continuum-save-interval '1' #セッションを保存する間隔を1分にする
set -g @plugin 'egel/tmux-gruvbox'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'