-
Notifications
You must be signed in to change notification settings - Fork 342
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
is_vim Doesn't Work In Subshell #195
Comments
@kwrobert can you confirm that you're using the current command, specifically:
Likewise, can you run the following and share the output:
Note the above command assumes you're interacting with a shell in pane 0, and have Vim open in pane 1. |
Confirmed I am using the the current The output of the second command if I have a plain zsh shell in pane 0 and vim open in pane 1, and execute the command in pane 0.
Now, if I exit vim, drop into a subshell/virtualenv, then reopen vim and re-execute the command in pane 0, here is the output I get
So this seems to be the problem. I ran
I hope that is helpful. It seems the |
I believe this is also related to this issue with pipenv, where the vim split switching doesn't work when inside the pipenv shell. One user in that thread had a solution for Linux (pypa/pipenv#1407 (comment)). |
Based on the workaround by @RobbieClarken in pypa/pipenv#1407 (comment), I think we could use a script/loop that would use
|
btw: |
I had this issue too, using pipenv that launches a subshell. I created a workaround script, something like @blueyed suggested. I've tested it on Ubuntu 16.04, tmux 2.6, vim 8.0. Create a script in your In
to:
Now the |
#201 solves this. |
@marcomayer |
@blueyed Ah sorry, my fault. I just had looked at master assuming this would be merged by now. I'll play around with your version and see if that helps fix my pipenv/tmux/vim issue ;) |
@marcomayer |
@blueyed yea if I'd have known how much time I'd spend to get this working in the beginning I'd surely have stopped. It's quite a mess. But now at least it looks like it's working okay thanks to your code. But I don't use the whole plugin, only parts of it trying to keep it simple. Btw on native vim, for me, this works for the suspend part: |
Hello, sorry for commenting in an old thread, but after of months with the is_vim function working properly it stopped working suddenly. Not sure if it is because an update to zsh or if it is something else, but any help is greatly appreciated. |
@danielo515 tmux was updated recently, which might be related. I've not investigated, and am not using this project/mechanism anymore: I find it more convenient to explicitly move between tmux panes and (Neo)Vim windows. |
That's a shame, because it can be very convenient to have this kind of
integration.
Do you know in which version of tmux this broke? I am not sure which
version to use
…On Thu, Jun 23, 2022 at 6:13 PM Daniel Hahler ***@***.***> wrote:
@danielo515 <https://github.com/danielo515> tmux was updated recently,
which might be related. I've not investigated, and am not using this
project/mechanism anymore: I find it more convenient to explicitly move
between tmux panes and (Neo)Vim windows.
—
Reply to this email directly, view it on GitHub
<#195 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARKJWITBE5XSVNKXSWAUH3VQSELBANCNFSM4ETME5JA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
---
https://danielorodriguez.com
|
The default
and it seems to work. Even when I send nvim to the background with Alpine Linux 3.19 |
This is also can be a problem if using NixOS with overlays. Using @rgeddes regex fixes this :) |
Hello!
I have discovered that the
is_vim
tmux command in the config snippet from the README, which is designed to determine whether or not the current pane is running vim, does not work when vim is opened within a subshell.I discovered this because I use a tool called hatch to manage my virtual environments when working with python. That tool uses subshells to drop you into a virtual environment, and whenever I am inside a virtual environment and use vim, the
:TmuxPaneCurrentCommand
reports "python3" as the current command. This means none of the keybindings get sent to VIM.Not a huge deal for me, I just open vim outside my virtual environments now and everything works, but I thought I would submit this issue in case anyone runs into the same issue and knows how to/has the motivation to fix this.
The text was updated successfully, but these errors were encountered: