ZyX wrote:
[...]
> >Would it be possible to have most Vim functions made callable from
> >Python this way? Obviously it's much better than using vim.eval().
>
> I assumed it be a convenience wrapper replacing
>
> vim.bindeval('function("bufnr")')('%')
>
> (obviously, you can save `vim.bindeval('function("bufnr")')` result in
> a variable) with a nicer syntax. I believe author of proposal assumed
> the same.
Calling functions would be a very common thing. Thus I would keep the
name as short as possible: vim.f.bufnr('%')
> >An example from the help:
> >
> > :py tagList = vim.eval('taglist("eval_expr")')
> >
> >Would then be something like:
> >
> > :py tagList = vim.functions.taglist(eval_expr)
> >
> >With the difference that eval_expr would be a Python expression.
>
> You mean, python regex?
No, just the difference of passing the whole string to vim.eval vs.
processing the arguments in Python and passing the result of that to
Vim.
--
Mental Floss prevents moral decay!
/// 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.