-
Notifications
You must be signed in to change notification settings - Fork 334
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
TmuxPaneCurrentCommand returns nothing on Windows-bash #163
Comments
My guess is that the process detection we're using to determine if Vim is the current process is not working on your version of bash. You can confirm this by changing out the tmux mappings for the ones using the older configuration: https://github.com/christoomey/vim-tmux-navigator/tree/33d688a028cd9d5f3ab8a4d994dbe14b8e13e55e#tmux. |
btw: is I guess you have to debug what in the process goes wrong, assuming you're using
from vim-tmux-navigator/vim-tmux-navigator.tmux Lines 3 to 4 in 7708d34
Try running it manually, e.g. |
|
No echos/feedback in there.. and I still think Please try the |
From above |
Sorry, new to this kind of debugging. Here's some echos:
|
By suspend VIM, do you mean run |
What is No, the |
|
My vim |
Ohoh, I've mixed up tmux pane and tty. ( |
Hey @blueyed mind if I step in and revive this discussion? On my Bash on Ubuntu on Windows, the ps command returns this:
$ tty
/dev/pts/1 However, like @kevin-king , I get no output from ps: $ ps -t '/dev/pts/1'
PID TTY TIME CMD
$ It looks like (Probably relevant comment from microsoft/WSL#482 (comment))
|
@ErnWong Anyway, I think your workaround would be to not limit it to the current pane's tty (i.e. remove the
|
Let me check.... In the workaround, won't removing the tty filter make all the tmux panes think they're running vim? I gave it a try and I couldn't navigate between tmux panes using the C-hjkl keys. Typing this in a non-vim pane: ps -o state= -o comm= | grep -iE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$' and typing this inside vim:
both gives Yeah, suspending vim to test stuff does interfere because suspending gives vim a 'T' state (at least on my machine), and our grep regex is designed to ignore them. But otherwise yup, thanks, removing the tty filter does make my vim navigation work again in the short term. In my free time, I might experiment with stuff and see if I can get a test that works on my machine. No guarantees, though, because I'm very inexperienced with linux. I'm sorry for replying so late. Our timezones are slightly out of phase 😏 |
Hey @blueyed, I somehow managed to get a test script working on my machine! It's a bit... less elegant than the original, and haven't been stress-tested yet, let alone tested on other platforms.
It's surprising what can be learned by reading the source code of emscripten. |
Great news! I've just installed Creators Update for Windows 10, and the provided vim-tmux-navigator plugin now works on my machine inside bash on ubuntu on windows. |
Hey @ErnWong, thanks for updating and glad to hear things are working for you now! I'm going to close this now as it sounds like the version was the main issue, but please do update if you discover anything else. |
I'm using Window 10 (64bit) and running Ubuntu bash using the Windows 10th anniversary edition update. I have a full install of Vim 8.0 in both Windows and bash (Windows is 64 bit, the bash is Vim Huge version - it is not 64 bit if that's relevant). All plugin keys are at their default mappings and I've cleared out my .vimrc for testing.
When I run vim-tmux-navigator in bash, I can navigate from tmux to vim and back with no issues. I cannot move between Vim buffers though with the hotkeys. I can do it if I write the commands out explicitly :TmuxNavigateLeft/Up/Down/Right/Previous though.
On windows, the hotkeys works perfectly. I saw the note about TmuxPaneCurrentCommand online and figured I'd post about it. Do you have any advice on why this could be happening?
The text was updated successfully, but these errors were encountered: