-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
99 lines (77 loc) · 2.86 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
set-option -g default-shell /opt/homebrew/bin/zsh
## change prefix key ( restart tmux server required )
set -g prefix C-t
unbind C-b
## start window index at 1
set -g base-index 1
## start pane index at 1
setw -g pane-base-index 1
## highlight window when it has new activity
# setw -g monitor-activity
## コピーをVi操作化
set-window-option -g mode-keys vi
## コピーモード突入
bind y copy-mode
## ペースト
bind p paste-buffer
# ESCキーの時間を短縮する
set -s escape-time 0
# https://github.com/tmux/tmux/issues/909
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
unbind -T copy-mode-vi Enter
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
## 設定ファイルの再読み込み
bind r source-file ~/.tmux.conf\; display-message "Reload Config!!"
## スクロール行数 (2000)
set-option -g history-limit 200000
## ペインを水平・垂直分割
bind s split-window -h
bind v split-window -v
unbind-key l
bind h swap-window -t -1
bind l swap-window -t +1
## Shift + 上下左右でペインを移動できるようにする。
bind -n S-left select-pane -L
bind -n S-down select-pane -D
bind -n S-up select-pane -U
bind -n S-right select-pane -R
## ペインの移動(ローテート)
unbind Up
unbind Down
unbind Left
unbind Right
bind Up previous-window
bind Down next-window
bind Left previous-window
bind Right next-window
## Resize
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
## 新しいペインを開く際、分割元のペインと同じディレクトリにする
bind s split-window -h -c '#{pane_current_path}'
bind v split-window -v -c '#{pane_current_path}'
## tmux + vim yank problem http://qiita.com/items/bea95b1bc6e6ca8a495b
## set-option -g default-command "reattach-to-user-namespace -l zsh"
## http://mironal-memo.blogspot.jp/2013/06/mac-tmux.html
set-option -g default-command 'which reattach-to-user-namespace > /dev/null 2>&1 && reattach-to-user-namespace -l $SHELL || $SHELL'
## 複数ペイン同時入力
bind a set-window-option synchronize-panes on
bind A set-window-option synchronize-panes off
# improve colors
set -g default-terminal "screen-256color"
# [tmux 上で Vim を True Color \(24 bit color\) で使う \- Qiita](https://qiita.com/yami_beta/items/ef535d3458addd2e8fbb)
set -as terminal-overrides ",xterm-256color:Tc"
set -as terminal-overrides ',*:U8=0'
# Style
set -g window-status-current-style 'reverse'
# set -g window-status-separator ''
set -g status-position top
set -g status-left '{#[fg=colour6]#S#[fg=colour7]}'
set -g status-right ''
set -g status-style 'bg=#1e2132 fg=#84a0c6'
set -g pane-border-style 'fg=#ffffff'
set -g pane-active-border-style 'fg=#ffffff'
set -g message-command-style 'bg=#1e2132 fg=#84a0c6'
set -g message-style 'bg=#1e2132 fg=#84a0c6'