-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
42 lines (33 loc) · 1.11 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
# set C-x as prefix instead of C-b
unbind C-b
set-option -g prefix C-x
bind-key C-x send-prefix
# enable mouse
set -g mouse on
# use (some) vi keybindings in copy mode
set-window-option -g mode-keys vi
# switch panes using Alt-hjkl without prefix
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# fix for Escape delayed inside tmux, at least with vim
set -s escape-time 0
# switch windows using C-number without prefix
bind -n C-0 select-window -t :0
bind -n C-1 select-window -t :1
bind -n C-2 select-window -t :2
bind -n C-3 select-window -t :3
bind -n C-4 select-window -t :4
bind -n C-5 select-window -t :5
bind -n C-6 select-window -t :6
bind -n C-7 select-window -t :7
bind -n C-8 select-window -t :8
bind -n C-9 select-window -t :9
# switch windows using Alt-n/p without prefix
bind -n M-n next-window
bind -n M-p previous-window
# use `v` and `p` for visual selection and pasting in copy mode
# (defaults are <space> and <enter>, respectively)
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel