Fix in_vim to work on Linux Mint 18

This commit is contained in:
Kenneth Benzie 2019-08-13 17:00:47 +01:00
parent 56739ba2e7
commit 43ce79c8c3

View File

@ -62,8 +62,8 @@ bind '"' split-window -c '#{pane_current_path}'
bind '%' split-window -h -c '#{pane_current_path}' bind '%' split-window -h -c '#{pane_current_path}'
# Integrate pane selection with vim # Integrate pane selection with vim
in_vim='[[ "$(tmux show-window-options)" = *"@vim#{pane_id}"* ]] && \ in_vim='tmux show-window-options | grep -q "@vim#{pane_id}" && \
[[ "#{pane_current_command}" != zsh ]]' [ "#{pane_current_command}" != "zsh" ]'
bind -n C-h if $in_vim 'send-keys C-h' 'select-pane -L' 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-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' bind -n C-k if $in_vim 'send-keys C-k' 'select-pane -U'