christoomey / vim-tmux-navigator

Seamless navigation between tmux panes and vim splits
MIT License
5.23k stars 323 forks source link

Cannot navigate from Vim/NeoVim->Tmux pane. #210

Open dmhenry opened 6 years ago

dmhenry commented 6 years ago

OS: macOS 10.13.6 Terminal Emulator: Terminal.app Tmux version: 2.7 Vim version: 8.1.50 Neovim version: 0.3.0

Runnning :TmuxPaneCurrentCommand in Vim yields:

Error detected while processing function <SNR>14_TmuxPaneCurrentCommand[1]..<SNR>14_TmuxCommand:
line    2:
E484: Can't open file /var/folders/4s/c_cfrv5n2xn1x6slyztzlhqm0000gn/T/vs65BjQ/0

Runnning :TmuxPaneCurrentCommand in NeoVim yields:

/usr/local/bin/bash: tmux -S /private/tmp/tmux-501/default display-message -p '#{pane_current_command}': No such file or directory

Searching for \vn(nore)?map\s+\<c-[hjkl]\> in .vimrc yields no results.

image

christoomey commented 6 years ago

Hi @dmhenry, sorry to hear about the issues here. Unfortunately the docs had gotten a bit out of date and : TmuxPaneCurrentCommand is no longer relevant, but I've just pushed a change which replaces that with a new debug command, :TmuxNavigatorProcessList which will debug against the actual command specified in the readme.

Can you pull current master and then run :TmuxNavigatorProcessList and copy the process list? We'd expect to see vim somewhere in the list.

Additionally, can you share what version of the tmux configuration you're using? You can just copy & paste the relevant section from your .tmux.conf.

dmhenry commented 6 years ago

Hi @christoomey, thanks for responding. I ran :TmuxNavigatorProcessList in both Vim and NeoVim with similar results. I did git pull from master. I even reinstalled tmux from Homebrew and reduced my .tmux.conf down to just what's needed for TPM:

set-option -g @plugin 'tmux-plugins/tpm'
set-option -g @plugin 'christoomey/vim-tmux-navigator'
run '~/.tmux/plugins/tpm/tpm'

OS: macOS 10.13.6 Terminal Emulator: Terminal.app Tmux version: 2.7 Vim version: 8.1.50 Neovim version: 0.3.0

Runnning :TmuxNavigatorProcessList in Vim yields:

Error detected while processing function <SNR>14_TmuxNavigatorProcessList[1]..<SNR>14_TmuxCommand:
line    2:
E484: Can't open file /var/folders/4s/c_cfrv5n2xn1x6slyztzlhqm0000gn/T/vkn91cj/0

Runnning :TmuxNavigatorProcessList in NeoVim yields:

/usr/local/bin/bash: tmux -S /private/tmp/tmux-501/default run-shell 'ps -o state= -o comm= -t ''''#{pane_tty}''''': No such file or directory
screen shot 2018-07-14 at 8 49 55 am
blueyed commented 6 years ago

Please try #201.

@christoomey Have you looked at it yourself already?

dmhenry commented 6 years ago

@blueyed I checked out #201. It does fix the Vim->Tmux navigation problem, but breaks navigation between Vim splits within a Tmux pane, at least for me.

blueyed commented 6 years ago

Pity. Vim I assume?

breaks navigation between Vim splits within a Tmux pane

So the normal C-w h/j/k/l? What mappings are you using?

You can check tmux show @tmux_navigator to see which panes are registered for Vim. Let's move the discussion to #201 maybe though.

agusdmb commented 6 years ago

I'm having problems with this too... but I'm in Linux, and I do get vim on the :TmuxNavigatorProccessList... This is the output of it:

S zsh
S AppRun
Z nvim <defunct>

I'm also using Neovim... Any suggestions on how to fix it?... I work mostly remotly so this issue has been a really pain for me since I'm almost always inside tmux

c-w [h,j,k,l,] Does work, but is longer to type and is not the natural way for me to do it... I'm sure you understand what I mean haha

blueyed commented 6 years ago

@agusdmb Please try #201 also - it is supposed to be faster and more robust.