Who´s Hugo? Why am I calling Georg Hugo? Is Alzheimer coming for me? ;-)
This is a recipe at the Python CookBook showing how to add a new directive to reStructuredText, called code-block, which syntax-highlights the block!
I just implemented it in Notty, and now you can have the neatest code snippets. I did have to hack the output a fair bit since the displaying widget doesn´t support <span> (or CSS for that matter), so I had to do massive search-replaces on the output, to convert to <font>. But it took only half an hour to do, since SilverCity´s output is very regular.
I think I will suggest this to Hugo for PyDS, considering the density of programmers among its users :-)
I can't find any editor (outside of emacs) that has a mode for it. And it needs a mode ;-)
In fact, because of the way it's marked, it seems a mode for scintilla or kate simply can't be done.
The problem is that, in order to understand what a paragraph is, you need to see the end of it, sometimes (for example, headings)
So, since most highlight parsers switch when they trip onto something (say, a quote), it doesn't work.
I could, I suppose, do highlighting using something more evil, like detecting when the user ends a paragraph to set the paragraph's style, in addition to the usual stuff, but it seems pretty hard to get right.
I always get this weird high when I'm coding. I have no idea why. I just do.
Last night, I didn't sleep, I was so hyper.
Eric Bina´s Xaw Mosaic.
Just read it.
Warning: foul language
Severe Warning: rampant programmer elitism
Extreme Warning: he´ SO right.