Merge pull request #682 from blackxored/patch-1
Use new syntax for smart pane navigation
This commit is contained in:
commit
21ca5cf5d8
@ -22,11 +22,12 @@ bind -r L resize-pane -R 5
|
|||||||
|
|
||||||
# Smart pane switching with awareness of vim splits.
|
# Smart pane switching with awareness of vim splits.
|
||||||
# Source: https://github.com/christoomey/vim-tmux-navigator
|
# Source: https://github.com/christoomey/vim-tmux-navigator
|
||||||
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
|
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
|
||||||
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
|
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||||
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
|
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||||
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
|
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||||
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
|
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"
|
||||||
|
|
||||||
# Use vi keybindings for tmux commandline input.
|
# Use vi keybindings for tmux commandline input.
|
||||||
# Note that to get command mode you need to hit ESC twice...
|
# Note that to get command mode you need to hit ESC twice...
|
||||||
|
Loading…
Reference in New Issue
Block a user