-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
73 lines (62 loc) · 1.89 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
# C-f prefix
unbind C-b
set -g prefix C-f
bind C-f send-prefix
# r: config reload
unbind r
bind r source-file ~/.tmux.conf
# double prefix: full screen toggle
unbind C-f
bind C-f resize-pane -Z
# y/p: copy/paste in copy mode
unbind p
bind p paste-buffer
# bind -t vi-copy 'v' begin-selection
# bind -t vi-copy 'y' copy-selection
# bind -t vi-copy 'Space' halfpage-down
# bind -t vi-copy 'Bspace' halfpage-up
# C-a: horizontal split
# C-s: vertical split
unbind '"'
unbind %
bind C-a split-window -h
bind C-s split-window -v
# h/j/k/l: vim pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Smart pane switching with awareness of vim splits
# # See: https://github.com/christoomey/vim-tmux-navigator
# is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)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"
# C-h/C-l: vim window movement
# bind -r C-h select-window -t :-
# bind -r C-l select-window -t :+
# alt + h/j/k/l: movement
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
# alt + shift + h/j/k/l: big vim window resizing
bind C-H resize-pane -L 10
bind C-J resize-pane -D 10
bind C-K resize-pane -U 10
bind C-L resize-pane -R 10
# misc
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
setw -g monitor-activity on
set -g visual-activity on
set -g mode-keys vi
set -g history-limit 10000
set -g mouse on
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'