-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
32 lines (25 loc) · 917 Bytes
/
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
# Use Vim keys for switching window panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Use Vim keys (capitalized) for resizing window panes
bind H resize-pane -L 20
bind L resize-pane -R 20
bind K resize-pane -U 10
bind J resize-pane -D 10
# Use Vim keys (jklh) for visual mode navigation
setw -g mode-keys vi
# Use Vim keys (vy) for selecting and yanking text
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
# Toggle white space inclusion
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# Use Vim key (p) for pasting buffer
unbind p
bind p paste-buffer
# Exit copy mode
bind-key -T copy-mode-vi 'Escape' send -X cancel
# Sources:
# - https://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu/
# - https://www.rockyourcode.com/copy-and-paste-in-tmux/