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 seem to work with Linux Snap package #4

Open
farzadmf opened this issue Apr 8, 2019 · 8 comments
Open

Doesn't seem to work with Linux Snap package #4

farzadmf opened this issue Apr 8, 2019 · 8 comments

Comments

@farzadmf
Copy link

farzadmf commented Apr 8, 2019

Hi,

I really like your extension, and I use it to open a file in Gvim:

"open-in-vim.openMethod": "gvim"

but there seems to be a problem with the vscode installed throught snap on Ubuntu 18.10. When I select the command "Open in Vim", nothing happens.

Do you know why that's happening, and if it can be solved?

Thank you

@jonsmithers
Copy link
Owner

Hm. I'd expect it to at least display an error message if something goes wrong. Does it work for other open methods, like integrated-terminal?

Also, is it perhaps an unnofficial/old snap of vscode? I saw a blurb about migrating vscode snaps:

Microsoft is now publishing an official snap of Visual Studio Code, you should migrate to it using these commands:

snap remove vscode
snap install code --classic

(https://snapcraft.io/vscode)

@farzadmf
Copy link
Author

farzadmf commented Apr 8, 2019

@jonsmithers Yes, it works with integrated-terminal, and also I'm using the official snap package.

I guess it could be due to a permission issue or something because of how snap packages are in a sandbox, but that's just a guess.

I tried in another system (a VirtualBox guest) with the same configuration as the other system, and I saw this error message; maybe it would be helpful:
image

@jonsmithers
Copy link
Owner

That's really interesting. I'm travelling at the moment and have really spotty internet, so it might be a few days before I can try the snap for myself.

Presumably running gvim path/to/file "+call cursor(1, 2)" by itself from the terminal works fine.

@farzadmf
Copy link
Author

It's OK. Take a look whenever you have time.

Also, I'm not sure if I'm missing something here, but when I run the command you mentioned, I get an error, and the terminal ends up showing vim in terminal and not Gvim, this is what I see:
image

@jonsmithers
Copy link
Owner

Oh wow. That seems to suggest that this is an issue with gvim. I have some ideas for random things to try:

  • If you just run gvim my-packages.txt (without "+call cursor(1, 2)"), it runs normally, right?
    • If so, try running gvim my-packages.txt -c "call cursor(1, 2)" to see if it's any different? This is supposed to be equivalent to gvim my-packages.txt "+call cursor(1, 2)".
  • Can you repeat the crash in a normal Terminal application, outside of vscode? (maybe it's a snap permission issue like you said)
  • What does gvim --version | head -n 2 say? I have version 8.1, with included patches 1-956, and it doesn't crash. If yours is more recent, maybe we should look into making a bug report with vim.

(As a side note, it would be nice if this open-in-vim plugin detected non-zero exits so that an issue like this doesn't unfold as a silent failure.)

@farzadmf
Copy link
Author

farzadmf commented Apr 13, 2019

Sorry @jonsmithers for the late reply, I tried a few things you suggested and:

  • Running gvim my-packages.txt in VSCode terminal:
    image

  • Running gvim my-packages.txt -c "call cursor(1, 2)":
    image

  • Of course in normal terminal, it's totally fine and running gvim my-packages.txt opens Gvim

  • Getting the version:
    image

Any ideas?

@jonsmithers
Copy link
Owner

Thanks for helping with all this experimentation. I feel fairly confident you are right about this being a snap permission issue. I was able to finally install the snap on Fedora and I can reproduce the issue myself too. I think the best place for further investigation is on vscode's side. I went ahead and made an issue there. Feel free to add anything I might have missed.

@farzadmf
Copy link
Author

Thank you @jonsmithers for creating that issue; let's see what happens there :)

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

2 participants