-
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
Pane navigation broken within pipenv shell #230
Comments
Hmm, this is interesting. I did a quick check locally (not a python user myself so I haven't run into this) and was able to reproduce the issue. Unfortunately, this seems to be the behavior of I don't have much to offer in the way of suggestions as those are the two methods we've historically used to detect Vim being active don't seem to work in pipenv shell. If you're able to find an alternative approach that we could use, I'd be happy to dig in further, but for now I'm unfortunately stumped. I'll keep this issue open in the hope that some kind internet person might come along with a suggestion :) |
I have encountered the same issue, my current workaround is aliasing |
I'm running into the same issue with an (oddly) almost identical setup as @NoahRJohnson. Just to make sure I understand, the crux of the issue seems to be that
I'm pretty novice with all of these tools, so in the hopes of inspiring someone else, would checking if vim is running with an approach similar to this work?
|
Has anybody found fixes to this problem? I have just ran into the same problem after switching from pyenv-virtualenv to pipenv. :( |
A sort-of-workaround which may be obvious but didn't occur to me initially: you can run vim inside the virtual environment without using pipenv shell by running This works around this issue if you just want vim to run inside the virtualenv so that things like pylint will work and don't care about being in a pipenv shell when you exit vim. |
I got the same issue but couldn't find a workaround yet :/ |
I can confirm this works for now. So I added zsh alias |
@mhoonjeon @ouroboros8 I ended using a version of #195 (comment) that works for me. That basically uses "tmux set -a" with $TMUX_PANE to globally set a variable/list that then is used by tmux to figure out if vim is running on the active pane. |
I just want to confirm that this problem also happens with As for poetry run vim and |
There's some information in python-poetry/poetry#2792 (comment) about why the new terminals are created. |
this should be added to the README |
Hey folks - I'm not a Python user myself so I don't feel entirely comfortable summing up all that's at play here, but if anyone wanted open a PR with a suggested update to the |
Hey,
|
@mauricekraus I don't find that this works; can you elaborate? Edit: I guess for me the Poetry shell shows up like:
Edit: Building on @mauricekraus, this works for me: is_poetry="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE 'Frameworks\/Python.framework'"
bind -n C-h run "($is_vim && tmux send-keys C-h) || ($is_poetry && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "($is_vim && tmux send-keys C-j) || ($is_poetry && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "($is_vim && tmux send-keys C-k) || ($is_poetry && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "($is_vim && tmux send-keys C-l) || ($is_poetry && tmux send-keys C-l) || tmux select-pane -R"
bind-key -n 'C-\\' if-shell "$is_vim" 'send-keys C-\\\\' 'select-pane -l' |
Hi guys, the reason why mauricekraus' workaround doesn't completely solve the issue for me is that when I activate the
One of my nvim configs contains these lines:
And I've added the following key bindings to my
I use |
Hello!! I have found this solution that is really straight forward in a pypa/pipenv issue: pypa/pipenv#1407 (comment) As suggested just adding "pipenv" to the regex of the Never done a Pull Request before, I'll look into it tomorrow, in the meantime here's the fix
|
Anyone know of any simple solutions for |
Hi Chris,
I'm a fan of this plugin. The only issue I've run into is when running vim inside of a pipenv shell.
os: Fedora 29
vim version: 8.1
tmux version 2.8
Steps to replicate:
:TmuxNavigatorProcessList returns
"
S bash
S pipenv
"
Is there any way to work around this?
The text was updated successfully, but these errors were encountered: