-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf.symlink
59 lines (49 loc) · 2.2 KB
/
tmux.conf.symlink
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
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# quick pane cycling
unbind Tab
bind Tab select-pane -t :.+
# smart pane switching with awareness of vim splits
# https://github.com/christoomey/vim-tmux-navigator
bind -n 'C-h' run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n 'C-j' run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n 'C-k' run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n 'C-l' run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
#bind -n 'C-\' run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# Resize panes with arrow keys
unbind-key -T prefix Up
unbind-key -T prefix Down
unbind-key -T prefix Left
unbind-key -T prefix Right
bind-key -r -T prefix Up resize-pane -U
bind-key -r -T prefix Down resize-pane -D
bind-key -r -T prefix Left resize-pane -L
bind-key -r -T prefix Right resize-pane -R
# Open new panes with cwd.
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
setw -g mouse on
# Scroll slower.
bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 1 scroll-up
bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 1 scroll-down
# Don't exit on mouse up.
unbind -T copy-mode-vi MouseDragEnd1Pane
set -s set-clipboard on
bind-key -T copy-mode-vi y send -X copy-selection
# Kubernetes status line
# set -g status-right "#(kubectx -c) #(kubens -c | xargs printf \"(%%s)\")"
# set -g status-right-length 60
# Window ordering
set-option -g renumber-windows on
bind-key -r < swap-window -d -t -1
bind-key -r > swap-window -d -t +1
# Recommendations from coc.nvim
# - ERROR `escape-time` (500) is higher than 300ms
# set escape-time in ~/.tmux.conf
set-option -sg escape-time 10
# - WARNING `focus-events` is not enabled. |'autoread'| may not work.
set-option -g focus-events on
set-option -g history-limit 1000000