Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
caerlie opened this issue Aug 4, 2016 · 8 comments
Open

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

caerlie opened this issue Aug 4, 2016 · 8 comments

Comments

@caerlie
Copy link

caerlie commented Aug 4, 2016

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
tmux1

tmux2

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

@christoomey
Copy link
Owner

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.

@caerlie
Copy link
Author

caerlie commented Aug 4, 2016

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 !

@christoomey
Copy link
Owner

@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?

@mb720
Copy link

mb720 commented Oct 31, 2017

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.

@Keris
Copy link

Keris commented May 27, 2018

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!

@blueyed
Copy link
Collaborator

blueyed commented May 28, 2018

Please check #201.

@AlexChalk
Copy link

AlexChalk commented Jul 14, 2018

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.

@blueyed
Copy link
Collaborator

blueyed commented Jul 14, 2018

Please try #201 - it is meant to work much better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants