-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf
95 lines (71 loc) · 2.28 KB
/
dot_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
unbind C-b
set -g prefix C-s
bind-key C-s send-prefix
#bind-key -n C-s send-prefix
set-option -g history-limit 5000
set -g default-terminal "xterm-256color"
# reload config
bind r source-file ~/.tmux.conf \; display-message "Reload Config!!"
# new windw
bind c new-window -c '#{pane_current_path}'
# split vertically
bind | split-window -h -c '#{pane_current_path}'
bind -n 'M-\' split-window -h -c '#{pane_current_path}'
# split horizontally
bind - split-window -v -c '#{pane_current_path}'
bind -n M-- split-window -v -c '#{pane_current_path}'
# move pane with shift+arrow
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
# move pane with vim keybind
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind k select-pane -U
bind l select-pane -R
bind N swap-window -t +1
bind P swap-window -t -1
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# resize pane with vim keybind
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# window with meta+arrow
bind -n M-c new-window -c "#{pane_current_path}"
bind -n M-w choose-tree -Zw
bind -n M-n next-window
bind -n M-p previous-window
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# window
bind -n M-1 select-window -t :=1
bind -n M-2 select-window -t :=2
bind -n M-3 select-window -t :=3
bind -n M-4 select-window -t :=4
bind -n M-5 select-window -t :=5
bind -n M-6 select-window -t :=6
bind -n M-7 select-window -t :=7
bind -n M-8 select-window -t :=8
bind -n M-9 select-window -t :=9
# syncronize pane
bind S set-window-option synchronize-panes
# set copy mode like vi
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
# dim non-active window
set -g window-style bg=brightblack
set -g window-active-style bg=black
# set -g default-terminal "screen-256color"
# set -g terminal-overrides 'xterm:colors=256'
set-option -s escape-time 10
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