-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
57 lines (46 loc) · 1.7 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
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
# enable mouse support
set -g mouse on
# ... and enable mouse mode toggling
bind m run "\
tmux show-options -g | grep -q \"mouse on\";\
if [ \$? -eq 0 ];\
then toggle=off;\
else\
toggle=on;\
fi;\
tmux display-message \"mouse is now: \$toggle\";\
tmux set-option -g mouse \$toggle;"
# required for vim-clipboard integration
set -g focus-events on
# allow scroll while in input mode
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
# try to use correct colors
set -g default-terminal screen-256color
#
set-option -sa terminal-overrides ',xterm-256colo:RGB'
# reload tmux config
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# rebind some clear history command
bind C-l send-keys C-l \; clear-history
# 500k lines of history...
set-option -g history-limit 500000
# reuse directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Use vim keybindings in copy mode
set-window-option -g mode-keys vi
unbind -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi y send-keys -X copy-selection
# And do not exit copy mode after copying
bind-key -T copy-mode-vi Enter send-keys -X copy-selection
# prevent delayed escape key
set -s escape-time 0
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.dotfiles/external/tpm/tpm'