Hello All,

Is there a reverse equivalent of this? I'm trying to see if I can
avoid writing my custom routines to take python lists and dictionaries
and convert them to vim lists and dictionaries.

Thanks!


vim.eval(str)                                           *python-eval*
        Evaluates the expression str using the vim internal expression
        evaluator (see |expression|).  Returns the expression result as:
        - a string if the Vim expression evaluates to a string or number
        - a list if the Vim expression evaluates to a Vim list
        - a dictionary if the Vim expression evaluates to a Vim dictionary
        Dictionaries and lists are recursively expanded.
        Examples:
            :py text_width = vim.eval("&tw")
            :py str = vim.eval("12+12")         # NB result is a string! Use
                                                # string.atoi() to convert to
                                                # a number.

            :py tagList = vim.eval('taglist("eval_expr")')
        The latter will return a python list of python dicts, for instance:
        [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
        'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to