-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
49 lines (42 loc) · 1.46 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
### options
set-option -g mouse on
set-option -g history-limit 20000
set-option -s escape-time 0
set-option -g focus-events on # for nvim
set-option -sa terminal-features ',alacritty:RGB' # for nvim
### shortcuts
# change prefix key to Ctrl+A
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# c - create window
# x - kill window
# n - next window
# p - previous window
# <space> - fast split
# w - window list
# switch pane without prefix using Alt
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-\\ select-pane -l
# scroll without prefix using Shift+PageUp
#bind -n Pageup copy-mode -u
bind -n S-Pageup copy-mode -u
bind -n S-Pagedown send-keys Pagedown
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
#is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
#bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
#bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
#bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
#bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
#bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"