summaryrefslogtreecommitdiff
path: root/tmux
diff options
context:
space:
mode:
Diffstat (limited to 'tmux')
-rw-r--r--tmux/.tmux.conf3
1 files changed, 2 insertions, 1 deletions
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
index f866605..78c06ee 100644
--- a/tmux/.tmux.conf
+++ b/tmux/.tmux.conf
@@ -12,7 +12,8 @@ bind r source-file ~/.tmux.conf
set -sg escape-time 0
set-option -g allow-rename off
-is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?|mutt)(diff)?$"'
+is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
+ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?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"