-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
80 lines (60 loc) · 2.49 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
# Pane nav
bind -n M-\ split-window -h -c "#{pane_current_path}"
bind -n M-- split-window -v -c "#{pane_current_path}"
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
bind -n M-S-h resize-pane -L 5
bind -n M-S-l resize-pane -R 5
bind -n M-S-k resize-pane -U 5
bind -n M-S-j resize-pane -D 5
bind -n M-t new-window -c "#{pane_current_path}"
bind -n M-Tab next-window
bind -n M-S-Tab previous-window
# Add truecolor support
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# ESC in vim taking too long
set -sg escape-time 0
# Enable mouse
set -g mouse on
# Use vim keybindings in copy mode
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
# Copy mouse selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel
# Needed for tmux-focus-events.vim plugin
set -g focus-events on
# Panes look
set -g pane-border-fg default
set -g pane-active-border-fg brightred
# Status look
set -g status-bg 'colour235'
set -g status-left '#[fg=colour222][#S] #[fg=brightred]#(whoami) '
set -g status-left-length 40
set -g status-right '#[fg=colour121]%r %a %Y #[fg=brightred]#H'
setw -g window-status-format '#[default][#I #W]'
setw -g window-status-current-format '#[fg=colour121][#I #F]'
# C-b C-b will swap to last used window
bind-key C-b last-window
# Allows for faster key repetition
set -s escape-time 0
# Highlight active window in tab-bar at bottom in red
set-window-option -g window-status-current-bg red
# Change cursor in vim to distinguish between insert and command mode
# Use in conjunction with tmux-cursors.vim
set-option -g terminal-overrides '*88col*:colors=88,*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cc=\E]12;%p1%s\007:Cr=\E]112\007:Cs=\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%p1%{2}%-%;%d\007'
# use C-b v to paste the tmux buffer
bind v paste-buffer
# renumber windows (if you have gaps in numbering, this renumbers them sequentially
# ^B r
bind r movew -r
# make mousewheel work when not in copy mode
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
# bind-key -t vi-copy WheelUpPane halfpage-up
# bind-key -t vi-copy WheelDownPane halfpage-down
# C-b C-b will swap to last used window
bind-key C-b last-window