On Nov 8, 2013 2:52 PM, "Marc Weber" <[email protected]> wrote:
>
> Excerpts from hong's message of Fri Nov 08 11:07:56 +0100 2013:
> > I know that Vim cannot load both python 2 and 3 at the same time.
> Depending on target it can !
> See source.

It depends on python (and vim, but these are more obvious) compilation
options. With the options used in Gentoo one can use both and with options
used in Ubuntu one cannot. There is a thread somewhere where Bram told me
what options are responsible for this, but I do not remember what was being
discussed there thus cannot find it.

What do you mean by "depending on target"?

> > Sometimes it is annoying since some plugins require python 2 and some
> > require python 3. As a simple workaround, we can create a universal
> > python command to run python code with the loaded python version.

Such command will not work. Python 2 and python 3 are different languages
with a bunch of incompatibilities. There is a way to write code that runs
with both versions (like e.g. powerline does), but no command will make
python2-only code work in python3 and vice versa.

If plugin developer is willing to support two python versions absence of
such command is the least annoying problem.

Thus it is better to bug Ubuntu maintainers to compile Python 2 and 3 that
can be loaded with each other then go here suggesting such commands.

> Search for the :pyx command on vim-dev. I've suggested such. It was not
> merged.

If one is not being dumb and using huge "py << EOF" blobs it is not needed
much since there are :execute and funcrefs. I am not saying that this
command will not save some time, but that is all. Guess this is why there
was not much enthusiasm in merging this.

> As workaround have a look at github.com/MarcWeber/ultisnips
>
> If more plugins need such feature we should create a vim-py-support vim
> plugin documenting best practises and implementing such helpers.
>
> Marc Weber
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
"vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui