-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
102 lines (79 loc) · 2.69 KB
/
.tmux.conf
File metadata and controls
102 lines (79 loc) · 2.69 KB
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
#==============================
# Global config
#==============================
# change prefix binding Ctrl + b to Ctrl + x
unbind C-b
set -g prefix C-x
# non deley escape key
# http://d.hatena.ne.jp/tacahiroy/20111206/1323123603
set -s escape-time 0
# copy mode using vi key binding
set -g mode-keys vi
# terminal 256 color support
set -g default-terminal "screen-256color"
# aggressive window resize enable
set -g aggressive-resize on
# renumbering windows enable
set -g renumber-windows on
#==============================
# History config
#==============================
set -g history-limit 1000000
#==============================
# unbind default key binding
#==============================
# resize panes
unbind M-Up
unbind M-Down
unbind M-Left
unbind M-Right
unbind C-Up
unbind C-Down
unbind C-Left
unbind C-Right
# window rotation
unbind C-o
# layout rotation
unbind Space
#==============================
# key binding config
#==============================
# resend to prefix key for nested tmux
bind C-x send-prefix
# reload .tmux.conf
bind r source-file ~/.tmux.conf
# window rotation
bind -r C-r rotate-window
# split window vertical
bind v split-window -v
bind | split-window -v
# split window horizontal
bind h split-window -h
bind % split-window -h
# resize pane operation compatible vim
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
# pane movement operation compatible vim
bind -r h select-pane -L
bind -r l select-pane -R
bind -r k select-pane -U
bind -r j select-pane -D
# layout rotation
bind -r Space next-layout
bind -r S-Space previous-layout
#==============================
# mouse config
#==============================
if-shell "test $(echo \"$(tmux -V | awk '{print $2}' | grep -o '[0-9]\.[0-9]') > 2.0\" | bc) -eq 1" "source-file ~/dotfiles/tmux.d/mouse-mode-config-for-after-2.1.conf" "source-file ~/dotfiles/tmux.d/mouse-mode-config-for-before-2.1.conf"
#==============================
# clipboard config
# クリップボードコマンドは環境変数 TMUX_CLIPBOARD_CMD で指定
# (.zshrc で OS 別に設定: macOS=pbcopy, WSL=clip.exe, Linux=xclip)
#==============================
if-shell "test $(echo \"$(tmux -V | awk '{print $2}' | grep -o '[0-9]\.[0-9]') > 2.5\" | bc) -eq 1" "source-file ~/dotfiles/tmux.d/copy-mode-config-for-after-2.6.conf" "source-file ~/dotfiles/tmux.d/copy-mode-config-for-before-2.6.conf"
#================================================================================================
# import powerline config
#================================================================================================
if-shell "[ -e ${POWERLINE_TMUX_CONF} ]" "source-file ${POWERLINE_TMUX_CONF}"