-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
58 lines (46 loc) · 1.51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
unbind C-b
set -g prefix `
bind-key ` send-prefix
# `+r reloads the configuration, handy
bind r source-file ~/.tmux.conf
# Sane scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# get visual bell working
set-option -g bell-action any
set-option -g visual-bell on
#set -g base-index 1
set -g history-limit 100000
setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-select-window on
set -g mouse-resize-pane on
set -g mouse-utf8 on
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# set mouse off with prefix M
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Highlight active window
set-window-option -g window-status-current-bg red
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
bind p paste-buffer
# copy & paste between tmux and x clipboard
bind C-p run-shell "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer"
bind C-y run-shell "tmux show-buffer | xclip -sel clip -i"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"