John Fitzsimons said:
To speed up the process for Fitwell, others, it would seem like it
would be handy if there was a text, or rtf, editor that could create
coloured lines. For example, colour blue all lines that start with a
">". Wonder if there is a way to do that ?
I've planned for a while to take a close look at the editors who let you
customize their syntax highlighter files. Main purpose of mine was for
..reg files....
The other purpose, that's for mail & news messages. For when we sometimes
have a longer, involved message which we want to read over, outside our
mail\news reader. For those, the primary thing would be to offset the
comments ( >) lines to color, as Fitwell does.
Today I started to take a look into this. I've got about ten of the syntax
("programmers-") editors installed. I ran each one. Here was my test: whose
syntax customization options would be the simplest and fastest to figure
out.
The winner was ConTEXT. Quick instructions were in the help file. You create
a copy of a particular well-commented existing highlighter file, as template
for the new one you want to create. Define your keywords and extensions etc
within that. Then the ConTEXT interface provides a pretty convenient dialog
for further refinements, especially in the matter of colors.
I spent about twenty minutes, and got something working. I couldn't get
some of the refinements I wanted figured out, but the basics came through:
the making of a custom extension, setting the ">" to be a "comment line,"
choosing my colors.
Next...What do I see? That ConTEXT already comes with a highlighter file,
exactly for this, for mail/news messages.
http://www.fixedsys.com/context/hl/Hamster-Message.chl
http://www.fixedsys.com/context/ConTEXTsetup.exe
http://www.fixedsys.com/context/features.html
Hamster-Message.chl defaults to using extension .msg. But you can of course
create any extension you want (eg .mail) and define it in that file.
From your reader, save your exported mail/news messages with whatever
extension you decide on. And from there, you can of course set ConTEXT to
be the default handler for that extension.
Note to Fitwell. I recommend giving this choice a look-over. And here is
a nice benefit. After ConTEXT does the highlighting, you can export those
messages as .rtf or .htm, and the formatting (color, italic, etc) will be
retained.
Small note. I was hoping that a syntax editor would give me the option to
have lines starting with > vs >> vs >>> all in separate colors, like the
display you see in groups.google.com. But those differing levels of color
do not appear when using the hamster-message.chl highlighter file, and I
have not figured out how one would get that option in there.
A repete: I definitely recommend ConTEXT here. You have their existing
highlighter file all ready to go for the purpose. And then for changes to
color choices, extension, and so on, ConTEXT makes that easy to do.
And the one warning about ConTEXT does not apply here. I'd previously
viewed this editor as a heartbreaker, and avoided using it. The matter of
the author refusing to allow a word-wrap option for display. For mail&news
messages, however, that will not matter, since those already have short
line lengths (right-column hard breaks).
ConTEXT features page
http://www.fixedsys.com/context/features.html
ConTEXT downloads
http://www.fixedsys.com/context/ConTEXTsetup.exe
http://www.fixedsys.com/context/hl/Hamster-Message.chl
More highlighter files (php-html, etc):
http://www.fixedsys.com/context/download.html