-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
29 lines (19 loc) · 994 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
unbind C-b
set-option -g prefix C-a
set-option -g mouse on
set-option -sg escape-time 0
set-option -g history-limit 12000
# Override the default command to use `reattach-to-user-namespace` for everything.
set -g default-command "reattach-to-user-namespace -l ${SHELL}"
# Vim style navigation in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection, just like Vim
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Setup 'y' to yank (copy), just like Vim
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Bind ']' to use pbbaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"