Dear Groff hackers,
I just wanted to let you know that both the recently released SciTE v5.5.3
[1] and SciTECO v2.1.0 [2] add troff lexers, ie. syntax highlighting.
Since this comes from Lexilla, the Scintilla lexer library, many other
Scintilla-based editors could follow soon.
Since I am the author of this lexer (and SciTECO), I can tell you that it
is quite elaborate and tries to implement the actual lexical rules of
Troff/Groff - as far as this is possible since its lexical rules are very archaic and
actually it's impossible to 100% correctly tokenize Troff code. It depends
on runtime state, that's not available at the lexing stage. You know, the
halting theorem etc.
Anyway, it works good enough with compromises.
It supports ignore-blocks as well and folding!
The default lists of requests represent the superset of Groff, Heirloom
Troff and neatroff.
It doesn't currently highlight escapes very well in macro definitions,
since these are usually double quoted and how do I know how the macro will
be used in the end and that its contents will indeed get expanded and
interpreted as escapes??? There is no guarantee, although that's how they
are used in 99% of the cases. So some more compromises might be in order
here; or perhaps a lexer setting.
Furthermore I wrote some simplistic spell checking scripts both for SciTE
[3] and for SciTECO [4]. They wrap aspell.
These scripts/macros take syntax highlighting into account, so you can
tell it to spell check only comments, or only regular text or whatever.
They are kind of slow, though and do not offer corrections.
The SciTECO "sp" macro has to be invoked manually at the moment.
Still, better than nothing!
Since SciTECO v2.1.0 also adds Unicode support, it actually makes it quite
usable as an editor for international Groff documents (see screenshots).
Hope, that's of help at least to somebody.
Best regards,
Robin Haberkorn
[1]: https://www.scintilla.org/SciTE.html
[2]: https://rhaberkorn.github.io/sciteco/
[3]: https://gist.github.com/rhaberkorn/62996b0c3a9d618f389f5bdb81390e48
[4]: https://github.com/rhaberkorn/sciteco/wiki/Useful-Macros#spell-checker