-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
93 lines (71 loc) · 3.39 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @open 'O'
set -g @open-editor 'C-o'
set -g @open-S 'https://www.google.com/search?q='
set -g set-clipboard off
set -ga terminal-overrides ',*col*:Tc'
set -g update-environment ''
set-window-option -g window-size smallest
if-shell 'which reattach-to-user-namespace' 'set -g default-command "reattach-to-user-namespace -l ${SHELL}"'
set-option -g focus-events off
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-selection
set-option -g prefix C-b
bind C-space last-window
# Start numbering at 1
set -g base-index 1
bind v split-window -h -c "#{pane_current_path}"
bind = choose-buffer -F "#{buffer_size} bytes: #{=60:buffer_sample}"
# Unprefixed {{{
bind -n C-M-\\ setw synchronize-panes
bind -n C-M-c send-keys -R \; clear-history
bind-key -n C-M-h select-pane -L
bind-key -n C-M-j select-pane -D
bind-key -n C-M-k select-pane -U
bind-key -n C-M-l select-pane -R
bind-key -n C-M-o select-pane -t :.+
bind-key -n M-: command-prompt
bind-key -n M-\; last-pane
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key -n C-M-d run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '[[:digit:]]+'"
bind-key -n C-M-f run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '(^|^\\.|[[:space:]]|[[:space:]]\\.|[[:space:]]\\.\\.|^\\.\\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]*'"
bind-key -n C-M-g run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_git_special.sh #{pane_current_path}"
bind-key -n C-M-u run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '(https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*'"
bind-key -n C-M-_ run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_search.sh"
bind-key -n C-M-n next-window
bind-key -n C-M-p previous-window
bind-key -n C-M-Space next-layout
bind-key -n C-M-[ copy-mode
bind-key -n C-M-] paste-buffer
bind-key -n C-M-x confirm-before -p "kill-pane #P? (y/n)" kill-pane
bind-key -n C-M-z resize-pane -Z
bind-key -n M-Tab last-window
bind-key -n C-M-r source-file ~/.tmux.conf
# }}}
# Mouse mode {{{
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send -X scroll-up
bind -T copy-mode-vi C-WheelDownPane send -X scroll-down
unbind -T copy-mode-vi MouseDragEnd1Pane
bind -T copy-mode C-WheelUpPane send -X scroll-up
bind -T copy-mode C-WheelDownPane send -X scroll-down
unbind -T copy-mode MouseDragEnd1Pane
# }}}
set -g @plugin 'jimeh/tmux-themepack'
set -g @themepack 'powerline/block/magenta'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '$HOME/.tmux/plugins/tpm/tpm'