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

doesn't work when jump out from vim to tmux pane

Open caerlie opened this issue 8 years ago • 8 comments

doesn't work when jump out from vim to tmux pane.

this is my setting

■.tmux.conf v2.3 https://github.com/caerlie/vim-tmux-config-remote-linux/blob/master/.tmux.conf ■.vimrc v7.4 https://github.com/caerlie/vim-tmux-config-remote-linux/blob/master/.vimrc ■OS Ubuntu 12.04 LTS

■:TmuxPaneCurrentCommand when use :TmuxPaneCurrentCommand ,just return nothing tmux1tmux2

■<C-b>:display-message -p '#{pane_current_command}' when use [<C-b>:display-message -p '#{pane_current_command}'] in tmux, it reture vim!

caerlie avatar Aug 04 '16 02:08 caerlie

Hey @caerlie, sorry to hear about the trouble. Can you answer the following questions to help me debug for you:

  1. Am I correct in understanding that you can move between splits in Vim, and panes in tmux, but not from Vim window to tmux pane? Or is all navigation in Vim failing?
  2. With Vim active in a tmux session, can you run the following commang in the tmux prompt (you can access the tmux prompt with key binding <prefix>:
run-shell "ps -o state= -o comm= -t $(tmux display -p '#{pane_tty}') > tmux-debug.txt"

This should dump the process names to a file called tmux-debug.txt. That will help me debug things.

christoomey avatar Aug 04 '16 10:08 christoomey

Hey @christoomey

1, yes, i can move between splits in Vim, and panes in tmux. olny fail with Vim window to tmux pane.

2,tmux-debug.txt

thank You !

caerlie avatar Aug 04 '16 12:08 caerlie

@blueyed Can you help with debugging the process list as shown in tmux-debug.txt? Wondering if we might have hit a platform difference with Ubuntu?

christoomey avatar Aug 04 '16 13:08 christoomey

Hi!

I, too, can navigate between splits and panes containing bash, but once I've entered a pane with Vim, I can't use the ctrl + movement shortcuts anymore.

I've created tmux-debug.txt with this content

S bash
S udiskie
S vim

uname -a gives

Linux marathon 4.13.7-1-ARCH #1 SMP PREEMPT Sat Oct 14 20:13:26 CEST 2017 x86_64 GNU/Linux

Thanks for your great work!

Edit

My bad. Instead of installing the plugin the proper way (i.e., adding Plugin 'christoomey/vim-tmux-navigator' to .vimrc and executing :PluginInstall), I had simply added this to my .vimrc which is suggested in this blog entry:

nnoremap <C-j> <C-w><C-j>
nnoremap <C-k> <C-w><C-k>
nnoremap <C-l> <C-w><C-l>
nnoremap <C-h> <C-w><C-h>
nnoremap <C-\> <C-w><C-p>

Sorry for the mixup.

mb720 avatar Oct 31 '17 14:10 mb720

Hey

I encountered the same problem that I can navigate between vim splits, and tmux panels, but once I entered a panel with vim open, I cannot navigate out using ctrl+[h|j|k|l].

The tmux-debug.txt generated with the following content:

Ss   -zsh
S+   nvim
S+   /usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
S+   /usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

The environment details as follows:

os: macOS High Sierra 10.13.4
iTerm2 version: 3.1.6
tmux version: 2.7

Thanks for your great work!

Keris avatar May 27 '18 11:05 Keris

Please check https://github.com/christoomey/vim-tmux-navigator/pull/201.

blueyed avatar May 28 '18 17:05 blueyed

I was getting similar behaviour to @Keris, and similar output in the debugging:

Ss   -zsh
S+   nvim
S+   /usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
S+   tmux

Env:

os: macOS High Sierra 10.13.5
iTerm2 version: 3.1.5
tmux: 2.7

The solution for me was replacing the inlined grep pattern with the alternative mentioned at the bottom of the readme: https://github.com/mislav/dotfiles/blob/master/bin/tmux-vim-select-pane

@christoomey If this is a 'more robust check', is it worth making it the default instruction? I'll make a PR on the Readme if you'd welcome it.

AlexChalk avatar Jul 14 '18 17:07 AlexChalk

Please try https://github.com/christoomey/vim-tmux-navigator/pull/201 - it is meant to work much better.

blueyed avatar Jul 14 '18 18:07 blueyed