Skip to content

Commit 7e95bb0

Browse files
tmux improve nav
1 parent 0da0a98 commit 7e95bb0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lua/custom/plugins/tmux.conf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Smart pane switching with awareness of Vim splits.
22
# See: https://github.com/christoomey/vim-tmux-navigator
3+
set-option -sg escape-time 10
4+
5+
# vim-like pane resizing
6+
bind -r C-k resize-pane -U
7+
bind -r C-j resize-pane -D
8+
bind -r C-h resize-pane -L
9+
bind -r C-l resize-pane -R
10+
11+
# and now unbind keys
12+
unbind Up
13+
unbind Down
14+
unbind Left
15+
unbind Right
16+
17+
unbind C-Up
18+
unbind C-Down
19+
unbind C-Left
20+
unbind C-Right
21+
322
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
423
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
524
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'

0 commit comments

Comments
 (0)