-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
125 lines (106 loc) · 3.65 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# tmux usage
# ==========
# list session
# tmux ls
#
# resume session
# tmux attach
# tmux a
#
# kill session
# prefix C-&
# tmux kill-session -t session_name
#
# rename session
# prefix C-,
# Reload config file
# bind C-r source-file ~/.tmux.conf \; display-message "reloaded"
# Prefix
## C-bのアンバインドとキーバインドの再設定
unbind-key C-b
set-option -g prefix C-o
bind-key C-o send-prefix
# Option
# set-window-option -g mode-keys emacs
set-option -g history-limit 100000
set -g mouse on
# ステータスバーをutf8対応にする
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
# KeyBinding
bind C-t next-window
# prefix !
# bind 1 break-pane
# prefix " or -
# bind 2 split-window -v
# prefix | or \
# bind 3 split-window -h
# Resize window
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
# View
# リフレッシュの間隔を設定する(デフォルト 15秒)
set -g status-interval 5
# 左パネルを設定する
set -g status-left-length 100
# 左パネルを設定する
set -g status-right-length 50
# tmux Copy & Paste setting on macOS (<2.6)
# @see http://qiita.com/upinetree/items/cd80bc7865c52091be10
# require:
# brew install reattach-to-user-namespace
# set-option -g default-command "reattach-to-user-namespace -l $SHELL"
# tmux Copy & Paste setting on macOS (2.6+)
# @see https://github.com/tmux/tmux/wiki/Clipboard
bind -Tcopy-mode C-w send -X copy-pipe-and-cancel 'pbcopy'
bind -Tcopy-mode M-w send -X copy-pipe-and-cancel 'pbcopy'
bind -Tcopy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel 'pbcopy'
bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter 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 ] run-shell "pbpaste | tmux load-buffer - && tmux paste-buffer"
# tpm packages
# tmux-yank : システムのクリップボードにコピー
# tmux-open : URLやファイルを開く
# tmux-resurrect : セッションの保存・復元
# tmux-continuum : セッションの定期的保存
# tmux-battery : バッテリ残量等を表示
# tmux-pain-control : pain間の移動キーバインドをつけてくれる
# tmux-logging : #{session_name}-#{window_index}-#{pane_index} 毎のログを記録してくれる
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-open \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-pain-control \
tmux-plugins/tmux-logging \
'
run-shell '~/.tmux/plugins/tpm/tpm'
# tmux-resurrect
# set -g @resurrect-save 'S'
# set -g @resurrect-restore 'R'
# tmux-continuum
set -g @continuum-save-interval '180'
set -g @continuum-boot 'on'
# set -g @continuum-restore 'on'
# tmux-logging
# Usage
# =====
# Logging: prefix + shift + p
# Screen Capture: prefix + alt + p
# Save complete history: prefix + alt + shift + p
# Clear pane history: prefix + alt + c
#
# Setting
# =======
set -g @default_logging_path "$HOME/var/log/tmux-logging"
set -g history-limit 50000
set -g @continuum-restore 'on'