Permalink
Browse files

Recognize binary name 'vimx'

Some distributions ship 'vim' without xterm_clipboard support. A separate
package vim-x11 or similar then ships another binary 'vimx' with that
support.

To support vim-tmux-navigator with such a binary name, adapt the pattern
check to allow an optional 'x'.
  • Loading branch information...
1 parent 754871f commit 999d252134d7bcd5e488a611f795c6500c198d92 @patrickdepinguin patrickdepinguin committed Nov 12, 2015
Showing with 3 additions and 3 deletions.
  1. +1 −1 README.md
  2. +2 −2 pattern-check
View
@@ -55,7 +55,7 @@ this customization.
``` tmux
# Smart pane switching with awareness of vim splits
# See: https://github.com/christoomey/vim-tmux-navigator
-is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
+is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)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"
View
@@ -11,8 +11,8 @@ GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
NORMAL=$(tput sgr0)
-vim_pattern='(^|\/)g?(view|n?vim?)(diff)?$'
-match_tests=(vim Vim VIM vimdiff /usr/local/bin/vim vi gvim view gview nvim)
+vim_pattern='(^|\/)g?(view|n?vim?x?)(diff)?$'
+match_tests=(vim Vim VIM vimdiff /usr/local/bin/vim vi gvim view gview nvim vimx)
no_match_tests=( /Users/christoomey/.vim/thing /usr/local/bin/start-vim )
display_matches() {

0 comments on commit 999d252

Please sign in to comment.