-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
44 lines (38 loc) · 1.25 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
# remap prefix to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
set-option -g history-limit 10000
# Set vi mode for copy buffer
set-window-option -g mode-keys vi
bind P paste-buffer
# for version < 2.4
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# bind -t vi-copy y copy-pipe "xclip -i -sel p -f | xclip -i -sel c"
# for version >= 2.4
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind -T copy-mode-vi y send -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c" \; display-message "copied to system clipboard"
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# 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
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set -sg escape-time 0
# switch windows using Alt-nm without prefix
bind -n M-m next-window
bind -n M-n previous-window
bind -n M-f resize-pane -Z