[code][textadept] Advanced use of Textadept Lexers

From: Richard Philips <richard.philips.att.gmail.com>
Date: Wed, 26 Feb 2014 16:25:15 +0100


last week I implemented HTML-ization of source code in textadept.

For documentation purposes, I needed to capture code fragments together
with its colorization and to format it in HTML.

I took a short-cut :-)

Together with the new multiple field ui.dialogs.inputbox (thanks again,
Mitchell :-),
 I brought the relevant code fragments and formatting info
outside textadept and worked with the phenomenal Pygments software.
 Then I brought the result (HTML) back into textadept and put the HTML in
the clipboard.

But I think I can do better:

I looked into the code of lexer.load and lexer.lex and I think
it should be possible to populate M._tokenstyles with functions instead of
These functions could transform the tokens to text (e.g. HTML).

Is this something worthwhile to pursue? Any ideas about how to proceed?

Thank you for a response,


You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 26 Feb 2014 - 10:25:15 EST

This archive was generated by hypermail 2.2.0 : Thu 27 Feb 2014 - 06:35:55 EST