From: David Suarez de Lis Date: 2000-11-07T23:04:44+09:00 Subject: [ruby-talk:6120] Ref.: Re: Syntax highlighting for vim? 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 :!ruby -r xmp -n -e 'xmp($_, "\%l\t\t\# \%r\n")' > > -------------- 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 + ----------------------------------------------------------------------