From: Kyle Rawlins Date: 2002-08-03T04:25:01+09:00 Subject: yet another vim/ruby question --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I was somewhat confused as to who the current maintainer of the ruby syntax file is, so I'm sending this to the whole list. I think this was mentioned recently, but I just couldn't seem to figure out who it is from the archives; sorry about that. I found a small bug in the syntax/folding that I'm not skilled enough with syntax highlighting to fix. The following code highlights/folds wrong for me (vim 6.1, tried a bunch of different versions of the highlighting that I got from different places): while (var) fun() do print "hello\n" end end The problem seems to be that the 'while' is paired with the first 'end' and not the second as the end of that block. I figured out why this is happening; the line in syntax/ruby.vim for rubyOptDoBlock has a 'contains' that among other stuff has "ALLBUT,rubyDoBlock,rubyCurlyBlock" in it. I guess this is so that the optional 'do' for the while-type statements will not be matched as a rubyDoBlock, but it prevents any ruby blocks directly inside the 'while' from being matched correctly. If I insert an if statement or something in between then everything is fine. If I use curly braces for the block, the correct 'end' is matched for 'while' but the block inside is still not detected (I can tell because there is no fold available there). Again, apologies for not providing a solution but I just don't know enough about how the highlighting works to know the best way to do it. Hopefully this isn't fixed in some later version that I just haven't seen. thanks, -kyle --=20 http://mas.cs.umass.edu/~rawlins -- Let's hear it for the vague blur! (P.K.Dick) --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9StyJncsSsHSBypARAjn2AKC5ih17EJhgws6nYrqLC1l+2ceW+wCeMi9I BdJrdeKuYq//YReqa+QF0HU= =YAsK -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--