-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
62 lines (52 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
52
53
54
55
56
57
58
59
60
61
62
# _ ___
# | |_ _____ _ _ _ _ ___ ___ ___| _|
# | _| | | |_'_|_| _| . | | _|
# |_| |_|_|_|___|_'_|_|___|___|_|_|_|
#
# This is ale's ~/.tmux.conf
set -g mouse on
set -g history-limit 10000
set -g repeat-time 500 # Maximum repeat delay
set -g escape-time 0 # Removes <Esc> delay
# Ensures Vi mode when $EDITOR is not set to vim
set -g mode-keys vi
set -g status-keys emacs
# Enables and disables prefix for nested sessions
bind-key -T root M-o {
set prefix None
set key-table off
set status-style "fg=colour245,bg=colour238"
}
bind-key -T off M-O {
set -u prefix
set -u key-table
set -u status-style
}
# Adds movement between panes with hjkl
bind-key -T prefix h select-pane -L
bind-key -T prefix j select-pane -D
bind-key -T prefix k select-pane -U
bind-key -T prefix l select-pane -R
# Adds panes resizing (repeating) with Alt+hjkl
bind-key -r -T prefix M-h resize-pane -L
bind-key -r -T prefix M-j resize-pane -D
bind-key -r -T prefix M-k resize-pane -U
bind-key -r -T prefix M-l resize-pane -R
# Mimics visual mode properly
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi Escape send-keys -X cancel
# Creates new buffer on the current pane path
bind-key -T prefix c new-window -c "#{pane_current_path}"
bind-key -T prefix % split-window -h -c "#{pane_current_path}"
bind-key -T prefix '"' split-window -v -c "#{pane_current_path}"
# Starts indices from 1 and rename windows on exit
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
# Adds RGB support (see wiki/FAQ#how-do-i-use-rgb-colour and issues/696#issuecomment-268665191)
set -ga terminal-overrides ",*-256*:RGB"
# Use system clipboard
set -g copy-command "xclip -sel c -i"
bind-key -T prefix ] run-shell "xclip -sel c -o | tmux load-buffer -"\; paste-buffer -p
bind-key -T root MouseDown2Pane run-shell "xclip -sel c -o | tmux load-buffer -"\; paste-buffer -p