From: Charles Comstock Date: 2004-02-13T04:19:58+09:00 Subject: Re: XML/HTML display code for Ruby Simon Strandgaard wrote: > On Wed, 11 Feb 2004 16:03:37 -0600, Charles Comstock wrote: > > >>Alright so I know that RDoc does syntax highlighting on ruby code if you >>view each code block, and I know that you can use the top frames to >>switch around between files, but has anyone written a pretty print ruby >>to html converter that does nice things like link all the in project >>functions? That way if you call a function inside one method it will >>jump you to that method, or if you require a library it will jump you to >>that library, etc? This would be kind of nice in RDoc, but mostly it >>would be nice for a good way to read code others have written. I know I >>have seen similar stuff used on say the C code for the linux kernel, but >> it would be a nice way to peruse code in say rubyforge or RAA. >> >>On another, similar note, what pretty print to printer packages exist >>that do syntax highlighting of ruby? I gather enscript should have a >>module for it, not quite sure how to use that, I'm used to using a2ps, >>and haven't notice a highlighter for that thus far. Suggestions? > > > IIRC enscript cannot (yet) color Ruby code.. thats what rubyforge is using > in viewcvs. However VIM can hilight Ruby code.. and maybe be used in > conjunction with a2ps? > > BTW: It would be really nice with a syntax hiliter that could understand > the HEREDOC sections in Ruby code. For instance a "EOHTML" heredoc, could be > interpreted as HTML. Similar with EOXML, EORUBY, EOTEXT. > > Long time out in the future I plan to make a syntax hiliter myself for > AEditor.. but first I must finish my regexp-engine subproject. > > -- > Simon Strandgaard > > I'm not exactly familiar with the syntax for highlighting in a2ps, but I don't think you could use the vim hilighting in conjunction with it. If vim marked up the code it would be more likely that a2ps would try to print these additional control codes then use them as highlighting suggestions. That's my experience with a2ps anyway. Charles Comstock