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

Works in neovim but not in vim. #72

Open
xbot opened this issue Jun 22, 2021 · 5 comments
Open

Works in neovim but not in vim. #72

xbot opened this issue Jun 22, 2021 · 5 comments

Comments

@xbot
Copy link

xbot commented Jun 22, 2021

This plugin works perfectly in neovim, but complained the following errors in vim:

Error detected while processing function vira#_menu:
line   39:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'Vira' is not defined

Vim has +python3 enabled.

@n0v1c3
Copy link
Owner

n0v1c3 commented Jun 22, 2021

@xbot I hope the day is a good one.

These are always my favorite ones to hunt down on as it does appear to work on vim still.

I know it is worth a check of your whereis vim command and find out what the priority is. It may not be the same place that is getting updates anymore. Try run each one with full paths and see if there is a difference.

Issue #43 also is worth a look. We just kept talking until he got it to work. Also, give the dev branch a try if there is a difference there for you I will do a quick cleanup on that and merge to master.

I am definitely a vim user so I usually break the neovim without my double checking.

@xbot
Copy link
Author

xbot commented Jun 24, 2021

@n0v1c3 Thanks for your answer.

I tried these steps but the problem is still there.

The vim executable being used is the newest version installed by homebrew, not the system one of MacOS.

The dev branch works the same as master.

Issue #43 is for neovim, I find nothing helpful through it.

Another weird thing is, on my Macbook Pro, the problem is the other way around. Vira works in vim but not in neovim.

@n0v1c3
Copy link
Owner

n0v1c3 commented Jun 24, 2021

@xbox,

I think Mac is telling you to upgrade all systems to Pro now. 😁

If you want to dive in a bit with me. There is a function inside autoload that imports Vira. This function is where a path is added along with the import of the python side, vira#_init_python().

Take a look there and make sure it is at least getting these and the paths make sense. If you take of the silent! here you may get some more errors or simply echo some values.

@xbot
Copy link
Author

xbot commented Jun 28, 2021

@n0v1c3 Thank you very much. I finally found what the problem is.

The reason is, my vim uses a python3 installed by homebrew, but the shell runs the one installed by pyenv.

If it is possible that the install.sh find the real python installation used by vim before pip install jira, I think new users won't be bothered by this problem again.

@xbot xbot closed this as completed Jun 28, 2021
@n0v1c3
Copy link
Owner

n0v1c3 commented Jun 28, 2021

@xbot I am glad to hear this one.

I am going to keep this issue open and it will most likely end up with a VIRA tag beside it so it can simply go away.

@n0v1c3 n0v1c3 reopened this Jun 28, 2021
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