From 33f99d8c8954cc365bad766ebacfb67a5b0aef95 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 19 Oct 2017 11:46:45 +0200 Subject: Minor changes --- tmux/.tmux.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tmux/.tmux.conf') 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" -- cgit v1.2.3