From b5526ca42b224e779e8a59f023fdf3c8c6ea8411 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 16 Aug 2019 21:54:52 +0100 Subject: [PATCH] Remove zsh check from vim window flag Make using the `@vim$TMUX_PANE` window flag much more robust by unsetting it every time the zsh prompt is drawn and setting it again using a `FocusGained` `autocmd` in vim. This removes the need for the hacky check for zsh in the conditional defined in the `in_vim` variable. --- tmux.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmux.conf b/tmux.conf index 4826669..fb83436 100644 --- a/tmux.conf +++ b/tmux.conf @@ -62,8 +62,7 @@ bind '"' split-window -c '#{pane_current_path}' bind '%' split-window -h -c '#{pane_current_path}' # Integrate pane selection with vim -in_vim='tmux show-window-options | grep -q "@vim#{pane_id}" && \ - [ "#{pane_current_command}" != "zsh" ]' +in_vim='tmux show-window-options | grep -q "@vim#{pane_id}"' bind -n C-h if $in_vim 'send-keys C-h' 'select-pane -L' bind -n C-j if $in_vim 'send-keys C-j' 'select-pane -D' bind -n C-k if $in_vim 'send-keys C-k' 'select-pane -U'