VIM syntax coloring files for Ruby

Discussion in 'Ruby' started by Henry T. So Jr., Aug 26, 2004.

  1. 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
     
    Henry T. So Jr., Aug 26, 2004
    #1
    1. Advertising

  2. Henry T. So Jr.

    Doug Kearns Guest

    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
     
    Doug Kearns, Aug 26, 2004
    #2
    1. Advertising

  3. Henry T. So Jr.

    Joe Laughlin Guest

    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.
     
    Joe Laughlin, Aug 26, 2004
    #3
  4. Henry T. So Jr.

    Doug Kearns Guest

    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/cgi/viewcvs.cgi/?cvsroot=vim-ruby

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

    Regards,
    Doug
     
    Doug Kearns, Aug 27, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tocer
    Replies:
    0
    Views:
    478
    tocer
    Aug 28, 2004
  2. Daniel Folkes

    New to Vim and Vim-Python

    Daniel Folkes, Oct 24, 2007, in forum: Python
    Replies:
    3
    Views:
    546
    projecktzero
    Oct 25, 2007
  3. Guoliang Cao

    vim 6.2 + vim-ruby don't work

    Guoliang Cao, Oct 16, 2003, in forum: Ruby
    Replies:
    1
    Views:
    167
    Brett H. Williams
    Oct 16, 2003
  4. Vincent Foley
    Replies:
    6
    Views:
    148
    Gavin Sinclair
    Apr 10, 2006
  5. lolveley
    Replies:
    3
    Views:
    213
Loading...

Share This Page