tmux improve nav
This commit is contained in:
parent
df55f91ba5
commit
4393d97823
|
@ -1,5 +1,24 @@
|
||||||
# Smart pane switching with awareness of Vim splits.
|
# Smart pane switching with awareness of Vim splits.
|
||||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||||
|
set-option -sg escape-time 10
|
||||||
|
|
||||||
|
# vim-like pane resizing
|
||||||
|
bind -r C-k resize-pane -U
|
||||||
|
bind -r C-j resize-pane -D
|
||||||
|
bind -r C-h resize-pane -L
|
||||||
|
bind -r C-l resize-pane -R
|
||||||
|
|
||||||
|
# and now unbind keys
|
||||||
|
unbind Up
|
||||||
|
unbind Down
|
||||||
|
unbind Left
|
||||||
|
unbind Right
|
||||||
|
|
||||||
|
unbind C-Up
|
||||||
|
unbind C-Down
|
||||||
|
unbind C-Left
|
||||||
|
unbind C-Right
|
||||||
|
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
||||||
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||||
|
|
Loading…
Reference in New Issue