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

Re: Extending Scripting By Using Perl, Python, Tcl, and Ruby

Expand Messages
  • Tim Hammerquist
    ... Using supplementary scripting languages does not seem to be a frequent topic on the ML (or on comp.editors, for that matter), but it does get discussed.
    Message 1 of 5 , Sep 1, 2002
    • 0 Attachment
      The Vim Man wrote:
      > I was wondering why there are no posts of some of the more
      > interesting scripts made in any of the above languages to see
      > how good a combination you can make using Vim with these
      > scripting languages.

      Using supplementary scripting languages does not seem to be a
      frequent topic on the ML (or on comp.editors, for that matter),
      but it does get discussed.

      > As far as I know, all the scripts currently on
      > vim.sourceforge.net just use Vim's own scripting language.

      Most use Vim's lang, yes, but there are a few projects that use
      the Perl or Python interface. I know there is at least one shell
      emulater for Vim that uses Python.

      OTOH, many scripts on vim.sf.net use Vim lang simply because it's
      the only one guaranteed to be available. Perl, Python, Ruby, and
      Tcl interfaces are all optional. Regardless of how cool
      something I wrote in Perl is, it won't do any good to someone
      who doesn't have vim +perl.

      > How powerful can you make Vim (what funky things can you do)
      > when you combine Vim with one of the above scripting languages?

      That said (above), I've been working on a ruby interface project
      for couple weeks. Nothing grand, but it ties Vim to an Xmms
      (*nix mp3 player) session.

      I found a ruby lib that connected to an xmms session, which I
      then loaded into a vim script and wrote a couple wrapper
      functions in Vim to call it with specific keybindings.

      Then I customized the vtreeexplorer.vim to load an mp3 file or
      playlist.

      Then I added an playlist editor buffer based on bufexplorer.vim.

      There are also a couple flourishes in the buffers, such as syntax
      coloring to demark the title, play-time, etc.

      A dedicated [XmmsControl] buffer is in the works at the moment.

      It hasn't been release to the public (on vim.sf.net) yet, and
      requires:

      - Vim +ruby
      - Xmms v1.2.6 or higher <http://www.xmms.org/>
      - XMMS-Ruby 0.1.0 or higher lib for Ruby
      <http://www.pablotron.org/>

      Timmy
      --
      Death is not good. I reject death. I will stay away from trucks today.
      -- Larry Wall in <199909151845.LAA26509@...>
    • Steve Hall
      From: Colin Keith ... This is one of those things proving not everything that *can* be done, *should* be. Colin, you scare me. ;)
      Message 2 of 5 , Sep 17, 2002
      • 0 Attachment
        From: "Colin Keith" <vim@...>
        >
        > http://vim.sourceforge.net/script.php?script_id=418
        >
        > it does read and write from your [Windows] registry.

        This is one of those things proving not everything that *can* be done,
        *should* be. Colin, you scare me. ;) (Nice job though!)


        Steve Hall [ digitect@... ]
      • Michael Brailsford
        ... I wrote this http://vim.sourceforge.net/script.php?script_id=274. It parses your C/C++ structs, typedefs and classes using ruby. It then creates vim
        Message 3 of 5 , Sep 17, 2002
        • 0 Attachment
          > As far as I know, all the scripts currently on vim.sourceforge.net just
          > use Vim's own scripting language. How powerful can you make Vim (what
          > funky things can you do) when you combine Vim with one of the above
          > scripting languages? Thanks for your time...--

          I wrote this http://vim.sourceforge.net/script.php?script_id=274. It
          parses your C/C++ structs, typedefs and classes using ruby. It then
          creates vim highlighting groups for them. I also find myself using ruby
          to write my vim functions becuase ruby's string processing is a lot
          easier to use than vim's builtin functions.

          -Michael
        Your message has been successfully submitted and would be delivered to recipients shortly.