Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > VIM syntax coloring files for Ruby

Reply
Thread Tools

VIM syntax coloring files for Ruby

 
 
Henry T. So Jr.
Guest
Posts: n/a
 
      08-26-2004
I have noticed that VIM cannot properly color the following construct
in Ruby:

module MyModule
def my_method
foo = [ [ 1, 2 ], [3, 4], [5, 6] ]
until foo.empty?
foo.shift.each do |element|
puts element
end # colored to match until
end # colored to match def
end # colored to match module
end # not colorized

In the syntax/ruby.vim file, the line after the comment "statement with
optional *do*", the statements here exclude rubyDoBlocks and
rubyCurlyBlocks from containment. I'm not entirely sure why it was set
up this way. If I change the ruby.vim file to remove this exclusion, it
still can't properly handle this construct:

module MyModule
def my_method
foo = [ [ 1, 2 ], [3, 4], [5, 6] ]
until foo.empty? do
foo.shift.each do |element|
puts element
end
end
end
end

Does anyone familiar with vim syntax files have any idea how to properly
correct this?

Regards,
Henry


 
Reply With Quote
 
 
 
 
Doug Kearns
Guest
Posts: n/a
 
      08-26-2004
On Thu, Aug 26, 2004 at 11:20:17AM +0900, Henry T. So Jr. wrote:
> I have noticed that VIM cannot properly color the following construct
> in Ruby:


<snip>

> In the syntax/ruby.vim file, the line after the comment "statement with
> optional *do*", the statements here exclude rubyDoBlocks and
> rubyCurlyBlocks from containment.


This sounds like quite an old version of ruby.vim. You can find the
latest here: http://vim-ruby.rubyforge.org/

Regards,
Doug


 
Reply With Quote
 
 
 
 
Joe Laughlin
Guest
Posts: n/a
 
      08-26-2004
Doug Kearns wrote:
> On Thu, Aug 26, 2004 at 11:20:17AM +0900, Henry T. So Jr.
> wrote:
>> I have noticed that VIM cannot properly color the
>> following construct in Ruby:

>
> <snip>
>
>> In the syntax/ruby.vim file, the line after the comment
>> "statement with optional *do*", the statements here
>> exclude rubyDoBlocks and rubyCurlyBlocks from
>> containment.

>
> This sounds like quite an old version of ruby.vim. You
> can find the latest here: http://vim-ruby.rubyforge.org/
>
> Regards,
> Doug


I just downloaded the stable version of ruby.vim and I get the same thing.


 
Reply With Quote
 
Doug Kearns
Guest
Posts: n/a
 
      08-27-2004
On Fri, Aug 27, 2004 at 03:55:42AM +0900, Joe Laughlin wrote:
> Doug Kearns wrote:
> > On Thu, Aug 26, 2004 at 11:20:17AM +0900, Henry T. So Jr.
> > wrote:
> >> I have noticed that VIM cannot properly color the
> >> following construct in Ruby:

> >
> > <snip>
> >
> >> In the syntax/ruby.vim file, the line after the comment
> >> "statement with optional *do*", the statements here
> >> exclude rubyDoBlocks and rubyCurlyBlocks from
> >> containment.

> >
> > This sounds like quite an old version of ruby.vim. You
> > can find the latest here: http://vim-ruby.rubyforge.org/
> >
> > Regards,
> > Doug

>
> I just downloaded the stable version of ruby.vim and I get the same thing.


It seems that there hasn't been a stable release in some time. I'd
recommend that you use the snapshot release or even a cvs tarball
available from
http://rubyforge.org/cgi-bin/viewcvs...sroot=vim-ruby

I'll try and organise a new stable release as soon as possible.

Regards,
Doug


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(debian,vim,Qt,ruby) on vim : no completion but everything elseworks fine lolveley Ruby 3 05-29-2009 04:30 PM
ruby syntax coloring in emacs Colin Brander Ruby 1 01-16-2007 08:50 AM
Little indenting bug in Vim's ruby.vim (version 2005-10-07) Vincent Foley Ruby 6 04-10-2006 01:46 AM
vim 6.2 + vim-ruby don't work Guoliang Cao Ruby 1 10-16-2003 04:32 PM
Ruby syntax-coloring in XEmacs Larry Elmore Ruby 0 07-21-2003 01:50 AM



Advertisments