-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
41 lines (33 loc) · 1.16 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
set-option -g mouse on
# enable vim keys
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# copy to xserver clipboard
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# typing 0 is not convenient
set -g base-index 1
# fast key repetition
set -s escape-time 0
# otherwise vim colors are broken
set -g default-terminal "xterm-256color"
# Create windows and splits with the working directory of the current shell
bind -n M-v split-window -v -c '#{pane_current_path}'
bind -n M-s split-window -h -c '#{pane_current_path}'
bind -n M-c new-window -c '#{pane_current_path}'
# switch panes with Alt + hjkl
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
# switch windows with Alt + number
bind -n M-0 select-window -t 0
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