Ruby syntax file in vim and implied hashes

If I write this:

check(:a => 1, :b => 2)

Ruby actually interprets it as this:

check({:a => 1, :b => 2})

However, the Ruby syntax file doesn’t seem to recognize it. For
example, if I have this code:

check(
:a => 1,
:b => 2
)

It won’t auto-indent it properly unless I add the braces:

check({
:a => 1,
:b => 2
})

Does anyone have a fix? (I don’t know how to write vim syntax files.)

While we’re at it, I have a piece of syntax that doesn’t highlight too:

Writing regexp without starting ~ (like ‘/(foo)/ and puts $1’) works for
Ruby, but doesn’t work for ruby.vim. Is it possible to fix this (I am
not so sure, given Ruby’s regexp syntax).

···

On Sat, Nov 09, 2002 at 04:50:45PM +0900, Philip Mak wrote:

Does anyone have a fix? (I don’t know how to write vim syntax files.)


Dmitry Borodaenko

This was fixed recently.
As always, http://mugca.its.monash.edu.au/~djkea2/vim/syntax/ruby.vim
for the latest.

Regards,
Doug

···

On Tue, Nov 12, 2002 at 09:16:16PM +0900, Dmitry Borodaenko wrote:

On Sat, Nov 09, 2002 at 04:50:45PM +0900, Philip Mak wrote:

Does anyone have a fix? (I don’t know how to write vim syntax files.)

While we’re at it, I have a piece of syntax that doesn’t highlight too:

Writing regexp without starting ~ (like ‘/(foo)/ and puts $1’) works for
Ruby, but doesn’t work for ruby.vim. Is it possible to fix this (I am
not so sure, given Ruby’s regexp syntax).