vim-tmux-navigator icon indicating copy to clipboard operation
vim-tmux-navigator copied to clipboard

Cannot navigate between vim windows on OSX

Open tieubao opened this issue 9 years ago • 13 comments

screen shot 2016-05-21 at 3 51 40 pm

I already install vim-tmux-navigator plugin, but I can't use the hotkey to navigate around. Using :TmuxNavigateLeft ... is good.

Everything is ok outside of tmux.

My env:

  • Mac OSX
  • Outside of TMUX: echo $TERM ---> xterm-256color
  • Inside of TMUX: echo $TERM ---> screen-256color

tieubao avatar May 21 '16 09:05 tieubao

Does it affect all mapping, or only some of them?

blueyed avatar May 21 '16 10:05 blueyed

@blueyed right now, only for navigation mappings

tieubao avatar May 21 '16 12:05 tieubao

@tieubao So for all mappings from tmux-navigator? (I was referring to if e.g. only C-h would not work)

blueyed avatar May 21 '16 13:05 blueyed

@blueyed all C-l, C-h, C-j, C-k

tieubao avatar May 21 '16 13:05 tieubao

Please try if https://github.com/christoomey/vim-tmux-navigator/pull/117 helps. Also check that you've setup tmux correctly (which is different in #117): tmux list-keys | grep -i vim.

blueyed avatar May 21 '16 14:05 blueyed

@blueyed I added those lines in .tmux.conf

bind -n C-h run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"

tieubao avatar May 21 '16 14:05 tieubao

Yeah, you would need to debug it from there, e.g. by adding some display-message there etc. But I suggest trying this based on #117.

blueyed avatar May 21 '16 14:05 blueyed

been experiencing the same recently

fuadsaud avatar Jun 21 '16 20:06 fuadsaud

I'm running Vim on Bash On Windows (WSL) and I'm having the same issue there too.

oblitum avatar Sep 03 '16 20:09 oblitum

I got the exact same problem as @tieubao oO

lucasprag avatar Dec 11 '16 00:12 lucasprag

Same issue over here (Debian Stretch).

thomascarreau avatar Dec 12 '16 17:12 thomascarreau

I'm running Vim on Bash On Windows (WSL) and I'm having the same issue there too.

I'm now running wsl-terminal (based on mintty) and have no issues anymore :-)

oblitum avatar Dec 22 '16 00:12 oblitum

I am experiencing this now.

latest iterm2, neovim installed from homebrew.

.tmux.conf:

 ~  cat ~/.tmux.conf
set-environment -g PATH "/usr/local/bin:/usr/bin"
# bind leader/prefix to C-a instead of C-b
unbind C-b
set -g prefix C-a
bind C-a send-prefix

^A r shows

~/.tmux/plugins/tpm/tpm returned 127

mschwartz avatar Mar 13 '20 16:03 mschwartz