From: Nikolai Weibull Date: 2005-05-24T18:21:03+09:00 Subject: Re: Vim's Ruby indenting Sam Roberts wrote: > Quoting gsinclair@gmail.com, on Tue, May 24, 2005 at 08:30:17AM +0900: > > To follow up Vincent's comments: to try your hand at this, there's > > no shortcut; just read the Vim help files on indenting and general > > Vim programming (it's fugly), and hack around with the existing > > highlighting code. I don't understand it myself. Indenting Ruby is > > Hard with a capital H. Writing the logic in the 10th-rate > > programming language that is VimScript (or whatever they call it) is > > insane, but Nikolai has done a great job. > I wonder whether using Syntax, based on the ruby parser, would allow an > external tool to be written (in ruby...) that would do better. Down side > is it wouldn't indent as you type, upside is you could set indentprg, > and run the whole file through it. This has been an idea of mine for some time, but I haven’t had time to try to implement it. It’d be nice to have something like this, but it probably requires a lot of work. > Nikolai has performed miracles, but it almost seems like an excercise in > coding in Brainfuck, or some similar language. Thanks. The main problem is that Vim lacks some tools (i.e., functions and such) that’d make this kind of stuff a lot easier to do. EMACS is a lot friendly in this regard, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}