Loading ...
Sorry, an error occurred while loading the content.

Re: [RFC] Some more python and VimL interfaces

Expand Messages
  • ZyX
    ... As I said you can write all of this with current interfaces. There are some corner cases fallback implementation cannot handle (I have written down some of
    Message 1 of 42 , May 11, 2013
    • 0 Attachment
      > Where it is feasible to implement it directly in python that sounds like
      > a good idea to me since it would probably ease the future maintenance
      > and allow more people to contribute to it.
      >
      > Though for some of the suggested additions I imagine that it will
      > negatively impact the performance and/ or be difficult to implement (e.g.
      > getting the escaping right for eval(), reliably parsing the output of
      > commands etc.). But that's something where ZyX probably can give more
      > qualified comments than I could.

      As I said you can write all of this with current interfaces. There are some corner cases fallback implementation cannot handle (I have written down some of them in some of the previous messages) (because VimL itself cannot handle them), but it is possible. More, VimL plugin + python module with the fallback implementation is on my TODO list.

      Negative impact to the performance will be there, but nothing as critical as fallback implementation to vim.bindeval would show.


      > I see that differently, currently people will have to learn quite a bit of
      > VimL to get anything useful done with the vim interface. For someone who is
      > new to vim, but already knows python, a "pythonic" interface is much
      > more useful then having to do eval("vimL_code()") all the time.
      > Some of the people I converted to vim users will probably never touch
      > VimL, but if it where possible to write plugins purely in python with a
      > pythonic interface they could write plugins for themselves as well
      > (since I also converted them to python ;))

      Yes, this is the target.

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Bram Moolenaar
      ... Yes, this also came up as a side effect of the os.chdir() solution. It s especially useful if a plugin can be distributed as a Python module plus some
      Message 42 of 42 , May 21, 2013
      • 0 Attachment
        Marc Weber wrote:

        > Yet another suggestion - what about adding &rtp to sys.path somehow ?
        > (with or without python version site-packages or the like)
        >
        > Then you could
        > - write .py files
        > - use them from python by
        >
        > import module
        > do_stuff()
        >
        > Yes - it can be trivially implemented in tools like vim-addon-manager,
        > but I'd prefer a global solution usable by everyone.

        Yes, this also came up as a side effect of the os.chdir() solution.

        It's especially useful if a plugin can be distributed as a Python module
        plus some lines in the Vim plugin. It would have a similar effect as
        using a Vim script under autoload.

        --
        A M00se once bit my sister ...
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- 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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.