I've made a txt2tags lexer, based on Jon Strait work for markdown.
You can find this lexer as attachment, and the only thing to add is in Scintilla.iface those parts:
val SCLEX_TXT2TAGS=99
# Lexical state for SCLEX_TXT2TAGS
lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_
val SCE_TXT2TAGS_DEFAULT=0
val SCE_TXT2TAGS_LINE_BEGIN=1
val SCE_TXT2TAGS_STRONG1=2
val SCE_TXT2TAGS_STRONG2=3
val SCE_TXT2TAGS_EM1=4
val SCE_TXT2TAGS_EM2=5
val SCE_TXT2TAGS_HEADER1=6
val SCE_TXT2TAGS_HEADER2=7
val SCE_TXT2TAGS_HEADER3=8
val SCE_TXT2TAGS_HEADER4=9
val SCE_TXT2TAGS_HEADER5=10
val SCE_TXT2TAGS_HEADER6=11
val SCE_TXT2TAGS_PRECHAR=12
val SCE_TXT2TAGS_ULIST_ITEM=13
val SCE_TXT2TAGS_OLIST_ITEM=14
val SCE_TXT2TAGS_BLOCKQUOTE=15
val SCE_TXT2TAGS_STRIKEOUT=16
val SCE_TXT2TAGS_HRULE=17
val SCE_TXT2TAGS_LINK=18
val SCE_TXT2TAGS_CODE=19
val SCE_TXT2TAGS_CODE2=20
val SCE_TXT2TAGS_CODEBK=21
val SCE_TXT2TAGS_COMMENT=22
val SCE_TXT2TAGS_OPTION=23
val SCE_TXT2TAGS_PREPROC=24
val SCE_TXT2TAGS_POSTPROC=25
You'll find the scite highlights in an other feature request.
updated lexer for txt2tags
updated Scintilla iface version
I've corrected the previous version, which was crashing when starting a line with a #.
Now most of the txt2tags highlight is covered.
The interface between Scintilla and lexers is being changed greatly as explained at http://www.scintilla.org/nulex.html . New lexers will not be added to Scintilla until after this work is complete which may be a month or two.
Do you think existing Lexers will need massive rewrite so they could be compatible with the new interface, or will it be just a few fix? I've read the document but don't really understand the implications.
Eventually it should stabilize to just require a particular set of headers and maybe some minor editing for basic compatibility. Using the new features will require more work.
Committed to Mercurial repository with changes. Standard set of lexer headers used to match current system. Removed unused function SetStateAndZoom.