On Jul 10, 2013 5:51 PM, "Tony Mechelynck" <antoine.mechely...@gmail.com>
wrote:
>
> On 10/07/13 14:08, Milan Vancura wrote:
>>>
>>> How about "A more pythonic Python interface"?
>>
>>
>> I would prefer clearer summary: what exactly is now possible?
>>
>> Example questions:
>>
>> * Can I write a script for vim in python only, without vimscript?
>
>
> Yes, but it will only run in a Vim compiled with +python, or in a Vim
compiled with +python/dyn if Vim can find the Python shared libraries at
runtime. (pr +python3 +python3/dyn for Python 3).

No, you can't live without vim.*eval or vim.command even if you don't care
about old versions.

>>
>> * What's the advantage? Is there new data model easier to understand than
>>    a myriad of random vimscript functions? Object model?
>
>
> The advantage of Vimscript is that all versions of Vim understand it, and
you can use ":if has(…)" and ":if exists(…)" to check if the version you're
currently running it has the features you need.
>
> The advantage of Python is that if you already used Python before
starting to use Vim you don't need to learn one more programming language.
>
>
>>
>> * Are there any bonus functions available from python only? For example
>>    a possibility to use something like CursorDown() instead of remapping
of keys
>>    which are only hoped to do such action (and could be already remapped
by
>>    another plugin)?
>
>
> Any Python function not related to Vim (and not defined by the Vim
module) becomes available if your Vim is compiled with +python (or with
+python/dyn and it knows where to find the Python libraries) (similarly
mutatis mutandis for Python 3). You will of course need to import the
relevant module(s), and call the appropriate Python function(s), either
individually by :python, repeatedly by :pydo, or collectively by invoking
either an external Python script by :pyfile, or a Python here-script by
:python << EOF (or, in all cases, the corresponding Vim-Python 3
interfacing commands).
>
> Otherwise, AFAIK the "Vim" module importable into Python just makes the
following kinds of functions available to Python:
> (a) commands which Vimscript can handle natively
> (b) functions related to interfacing between Vim and Python, including
representing Vim buffers etc. as python objects.
>
>
>>
>> * (plugins like) modules usable in another plugins so a system of plugin
>>    libraries becomes possible?
>
>
> see above
>
>
>>
>> etc. etc.
>>
>> I really do not know what's the status now. It may be that my questions
are too
>> much sci-fi :-)
>>
>> Milan
>>
>
> I think they are quite reasonable, even if I don't have all the answers.
>
>
> Best regards,
> Tony.
> --
> Put your Nose to the Grindstone!
>                 -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.
>
>
> --
> --
> 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 vim_dev+unsubscr...@googlegroups.com.
> 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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui