Marc Weber wrote:
> There are two important problems with python support:
> 1) you still have to use .viml in order to load python
> 2) when using python its you having to remember which python to use despite
> most codes may work with python and python3 interpreter.
> Using the same (only one) interpreter is very important, because
> many vims will only support one, and loading both is slower
>
> So this patch
> - introduces the the option loadpyplugins, which is disabled by default
> like loadplugins it tells vim to load plugin/*.py files
> - Special commands like "# requires python 2.x" can be used to force Vim using
> pyfile or py3file. If such a comment is missing the pythonx python version
> setting
> is used to decide upon which interpreter to use. Obviously this setting
> should be set early in your .vimrc and not be touched again
> Likewise there are :pyxfile :pydo :pythonx :pyx pyxeval() to run python code
> depending on 'pythonx' setting.
> - adds some of the commands to python.vim syntax file
I think it's a good idea to help people write portable Python plugins.
We want to avoid that every plugin has to be written twice.
Not everything is compatible between Python 2 and 3 though. Is there a
way to do:
if python3:
do-it-this-way
else:
do-it-that-way
Then :pyx would really work. Is that possible without getting errors
for some code that works only in one versin?
In the patch the docs have the section "Python 3" twice.
The default for 'pythonx' should be zero when build with both Python 2
and 3. Then the first Python command sets it.
Should be called 'pythonversion' actually.
--
hundred-and-one symptoms of being an internet addict:
30. Even though you died last week, you've managed to retain OPS on your
favorite IRC channel.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.