[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6120] Ref.: Re: Syntax highlighting for vim?

From: David Suarez de Lis <excalibor@...>
Date: 2000-11-07 14:04:44 UTC
List: ruby-talk #6120
El Tue, 07 November 2000, "Conrad Schneiker" escribi鷓

> Johann Spies wrote:
> 
> > I don't know where I got this but I have the following in my .vimrc:
> >
> > -------------
> > map <M-F10> :!ruby -r xmp -n -e 'xmp($_, "\%l\t\t\# \%r\n")'<CR>
> > --------------

You probably got it from the FAQ...
>
> Isn't this the thing that gets Ruby to evaluate the current selection and
> then inserts it on the right hand side of your text?

Yes it is... 

> > When I try and use it (Alt-F10), nothing happens.

Do you have xmp.rb installed on your system? It's not shipped with the std distro, afaik... Get it from the RAA (I got some stupid problems installing it and haven't yet pursuedon why... documentation is mostly in Japanese, which I cannot read very well :(

> > How do I get syntax highlighting for ruby on the vim editor?

Get the ruby.vim from the RAA and then put this in your $HOME/.vimrc

:au BufNewFile,BufReadPost	*.rb source $DIRECTORY/ruby.vim

This should load the ruby vim syntax file every time you create or read a file ending in .rb from $DIRECTORY... Vim 5.7a BETA 2000-06-10 and all 6.0x series bring ruby.vim with them...

Actually, 6.0k (at least) has ruby support included, and so you can do

:rubydo %gsub( 'any other scripting language', 'Ruby' )

to change all the buffer... there's even a class VIM with several subclasses (Window, Buffer, etc) with which you can interact with ViM from a ruby program loaded by ViM with :ruby, it's way cool! :)

(BTW, I have 6.0k in my home GNU box, compiled with Ruby only support (no perl and no python... good to learn the language better :)

Good luck
david

PS-

> As a really desperate last resort, do ":! emacs". (According to the Ruby FAQ

This is obscenous! :)

At the least, after loading the file, do a M-x vip-mode, that's less blasfemous... ;)

> Conrad

ah, bad boy... ;) d@


----------------------------------------------------------------------
+  Mensaje enviado gracias al correo gratuito de Desmasiado Corp.    +
+                  http://correo.demasiado.com                       +
----------------------------------------------------------------------

 

In This Thread

Prev Next