-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
54 lines (38 loc) · 1.95 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
unbind C-b
set -g prefix C-a # change prefix key
bind r source-file ~/.tmux.conf \; display "Reloaded tmux config file."
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L # alt-left
bind -n M-Right select-pane -R # alt-right
bind -n M-Up select-pane -U # alt-up
bind -n M-Down select-pane -D # alt-down
bind -n S-Left previous-window # shift-left
bind -n S-Right next-window # shift-right
bind-key -n C-S-Left swap-window -t -1 # ctrl-shift-left swap current with previous window
bind-key -n C-S-Right swap-window -t +1 # ctrl-shift-right swap current with next window
bind -n C-t new-window -a -c "#{pane_current_path}" # ctrl-t new window(new tab)
bind -nr C-h split-window -h -c "#{pane_current_path}" # ctrl-h split window horizontally
bind -nr C-v split-window -c "#{pane_current_path}" # ctrl-v split window vertically
#
# prefix, h means press prefix key(defined at the top of this config, e.g ctrl-a), release and then press h
#
bind h select-layout even-horizontal # prefix, h change layout to even-horizontal(horizontal panes with same sizes)
bind v select-layout even-vertical # prefix, v change layout to even-vertical(vertical panes with same sizes)
bind e setw synchronize-panes # prefix, e synchronize keyboard in all panes in current window
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
#set-option -g mouse-select-pane on # allow to change pane by mouse
#set-option -g mouse-select-window on # allow to change window by mouse
#set-window-option -g mode-mouse on
setw -g xterm-keys on
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
set -sg escape-time 0
#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
#bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-c run "tmux save-buffer - | xsel -ib"
bind C-v run "tmux set-buffer \"$(xsel -ob)\"; tmux paste-buffer"