Re: Extending Scripting By Using Perl, Python, Tcl, and Ruby
- The Vim Man wrote:
> I was wondering why there are no posts of some of the moreUsing supplementary scripting languages does not seem to be a
> interesting scripts made in any of the above languages to see
> how good a combination you can make using Vim with these
> scripting languages.
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 onMost use Vim's lang, yes, but there are a few projects that use
> vim.sourceforge.net just use Vim's own scripting language.
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)That said (above), I've been working on a ruby interface project
> when you combine Vim with one of the above scripting languages?
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
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
- Vim +ruby
- Xmms v1.2.6 or higher <http://www.xmms.org/>
- XMMS-Ruby 0.1.0 or higher lib for Ruby
Death is not good. I reject death. I will stay away from trucks today.
-- Larry Wall in <199909151845.LAA26509@...>
- From: "Colin Keith" <vim@...>
>This is one of those things proving not everything that *can* be done,
> it does read and write from your [Windows] registry.
*should* be. Colin, you scare me. ;) (Nice job though!)
Steve Hall [ digitect@... ]
> As far as I know, all the scripts currently on vim.sourceforge.net justI wrote this http://vim.sourceforge.net/script.php?script_id=274. It
> 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...--
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.