christoomey / vim-tmux-navigator

Seamless navigation between tmux panes and vim splits
MIT License
5.32k stars 329 forks source link

Vim -> Tmux not working #164

Open kevin-king opened 7 years ago

kevin-king commented 7 years ago

Running VIM v7.4, Tmux v2.0, and Bash on Ubuntu on Windows 10.

.tmux.conf:

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

.vimrc

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
  Plugin 'VundleVim/Vundle.vim'
  Plugin 'christoomey/vim-tmux-navigator'
call vundle#end()
filetype plugin on

A bash script I use to install everything:

...
# Tmux Config

 ln -s ~/.dotfiles/.tmux.conf ~/.tmux.conf
 git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
 tmux new -d -s install_plugins '~/.tmux/plugins/tpm/bin/install_plugins \; tmux source ~/.tmux.conf'

# VIM Config

 ln -s ~/.dotfiles/.vimrc ~/.vimrc
 git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
 vim -c 'PluginInstall' -c 'qa!'

With this setup, I can use <c-hjkl> to navigate between tmux panels no problem. If I remove the line for the tmux dependency (set -g @plugin 'christoomey/vim-tmux-navigator'), then VIM starts working. With both installed, if I'm in a VIM panel and run :TmuxPaneCurrentCommand, I get bash. I don't have a single key mapping or any additional plugins that might be interfering.

Thanks for maintaining the plugin! Let me know what I can do to help. Will continue investigating the issue and report back if I find anything.

kevin-king commented 7 years ago

Just tested running :TmuxPaneCurrentCommand with only the VIM part of the plugin installed out of curiosity. Also got bash.

blueyed commented 7 years ago

Like I've mentioned in https://github.com/christoomey/vim-tmux-navigator/issues/163#issuecomment-274353162 this command might not be relevant anymore.

kevin-king commented 7 years ago

Yeah sorry literally just saw the post from yesterday. Bash version GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu). Thanks for the quick response.

blueyed commented 7 years ago

Can you follow up on https://github.com/christoomey/vim-tmux-navigator/issues/163#issuecomment-274353162 then may, with regards to debugging it?