-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
80 lines (63 loc) · 1.82 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
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',st*:Ss:Tc'
set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# TODO: enabling it makes scrolling work in mobaxterm but breaks remove connection
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# escape delay fix for vim
set -sg escape-time 0
# rebind prefix to Ctrl-x
unbind C-b
set -g prefix C-x
bind C-x send-prefix
# enable vi mode
setw -g mode-keys vi
# vi copy mode
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-selection
bind p paste-buffer
# disable mouse
set -g mouse on
bind m set -g mouse
# force close window
bind q killp
# vi keys for switching panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind > swap-pane -D
bind < swap-pane -U
# pane resizing
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
# window navigation
bind -r C-h previous-window
bind -r C-l next-window
bind Tab last-window
# swap windows
bind-key C-j swap-window -t +1
bind-key C-k swap-window -t -1
# vi splits in same directory
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
# index windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# renumber windows when a window is closed
set -g renumber-windows on
# bind Alt+num to switch windows
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
# set history size
set-option -g history-limit 50000
# set default status bar color
set -g status-bg blue