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

Re: insert multitline from ruby script

Expand Messages
  • björn
    ... Instead of sytem(...) you can call any Vim function...in particular you can supply your own. For example: function! Test() return hi! endfunction You
    Message 1 of 5 , Mar 21, 2011
    • 0 Attachment
      On 15 March 2011 14:02, pierre wrote:
      > Ahem!... another difficulty
      > The technique
      > <C-R>=system("ruby /path/to/file")
      > works nicely apart from a problem: I can no longer
      > access things like VIM::Buffer in my ruby script, while
      > they work ok if I use
      > :rubyf /path/to/file
      > on the command line.

      Instead of sytem(...) you can call any Vim function...in particular
      you can supply your own. For example:

      function! Test()
      return "hi!"
      endfunction

      You can now <C-R>=Test() and "hi!" will be inserted into the buffer.
      If you need more help with this you should ask on the vim_use Google
      Group.

      Björn

      --
      You received this message from the "vim_mac" 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
    Your message has been successfully submitted and would be delivered to recipients shortly.