-
Notifications
You must be signed in to change notification settings - Fork 4
/
.tmux.conf
28 lines (23 loc) · 1.07 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
set -g default-shell /bin/fish
set -g mode-keys vi
# Advertise 256 colors.
set -g default-terminal "screen-256color"
# Scroll (and copy) with the mouse.
set -g mouse on
# Vi-style copy / paste.
# http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu/
bind P paste-buffer
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi 'C-v' send -X rectangle-toggle
unbind -T copy-mode-vi Enter
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -selection clipboard'
bind -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -selection clipboard'
#bind P run "xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer"
# Older than 2.4
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# bind-key -t vi-copy 'r' rectangle-toggle
# bind -t vi-copy y copy-pipe "xclip -selection clipboard"
# MacOS only
# bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"