-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
61 lines (47 loc) · 1.4 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
unbind C-b
unbind '"'
unbind %
set -g prefix C-a
set -g allow-rename off
set -g status-position top
set -g mouse on
set -sg escape-time 0
set -g base-index 1
setw -g pane-base-index 1
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",alacritty:Tc"
set-option -g repeat-time 0
bind C-a send-prefix
bind r source-file ~/.tmux.conf
bind-key : command-prompt
bind h split-window -h
bind v split-window -v
bind t clock-mode
bind c new-window
bind a last-pane
bind n next-window
bind N previous-window
bind [ copy-mode
bind ] paste-buffer
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-l select-pane -L
bind -n C-h select-pane -R
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind-key a last-pane
bind-key q display-panes
bind-key c new-window
bind-key t next-window
bind-key T previous-window
bind-key [ copy-mode
bind-key ] paste-buffer
# Install plugin manager
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'