lambdalisue / vim-pyenv

Activate the versions and the virtualenvs of pyenv within a live VIM session
107 stars 5 forks source link

Error running PyenvActivate #13

Closed oblitum closed 9 years ago

oblitum commented 9 years ago

Just installed the plugin and Vim, I've built Vim with:

./configure --prefix=/opt/vim-for-python3 --with-features=huge --enable-luainterp --enable-rubyinterp --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-perlinterp --with-compiledby=francisco@oblita.com

Upon PyenvActivate I get:

Error detected while processing function pyenv#activate..<SNR>185_activate..<SNR>185_deactivate..pyenv#pyenv#deactivate..<SNR>186_deactivate:
line    7:
E121: Undefined variable: g:pyenv#auto_withdraw_ctags
E15: Invalid expression: g:pyenv#auto_withdraw_ctags

I've glanced over the plugin code, shouldn't it check whether the variable exists or set it to a default value before using?

Also, I see you're supporting vim built with both python and python 3, I've heard vim doesn't work when built with both, except if you build it with the dynamic option. From your experience is this correct in any sense?

oblitum commented 9 years ago

By the way, resetting the plugin to a commit before the current master fixed it for me.

lambdalisue commented 9 years ago

Thanks. It should be fixed in the latest now :-)

oblitum commented 9 years ago

Thanks, fixed.

lambdalisue commented 9 years ago

Also, I see you're supporting vim built with both python and python 3, I've heard vim doesn't work when built with both, except if you build it with the dynamic option. From your experience is this correct in any sense?

Yes. But it might be tough job to compile Vim with +python/+python3, I succeeded it in Ubuntu but Mac OS X.

lambdalisue commented 9 years ago

But it is quite useful if Vim is built with +python/+python3 :-) This is one of the reason I prefer Ubuntu.

oblitum commented 9 years ago

Ok, I've succeeded on Ubuntu with ease, I use both Linux (Arch at home) and OS X, will try on OS X later. What's your opinion on --enable-pythoninterp=dynamic --enable-python3interp=dynamic vs --enable-pythoninterp --enable-python3interp? Any difference, tip or problem you have faced?

oblitum commented 9 years ago

It's my first try with both py and py3 support, it seems it's mostly ok, but my vim is starting with py3 enabled, when I try to open vimfiler I get a python error coming from UltiSnip, so I first activate python 2, before triggering this error, I open vimfiler so that UltiSnip scripts runs on python 2, for then, activate any python 3 instance to code python 3 code.

lambdalisue commented 9 years ago

That's same. Vim automatically handle thease dynamic when user specify both. well, i don't recomend it on Mac. Homebrew users ended up as well, so it woud be really difficult to compile on Mac

oblitum commented 9 years ago

I compile my own vim on mac, so no problem for me regarding homebrew there.

lambdalisue commented 9 years ago

Well, I tried as well without using brew but I had no luck. Let me know if you succsess!

lambdalisue commented 9 years ago

I was talking about this. https://github.com/Homebrew/homebrew/pull/31367

oblitum commented 9 years ago

Thanks. No problem, I'll report if I get it to work on OS X.