[Geany-devel] porting the txt2tags syntax on Geany
Forgeot Eric
eforgeot at xxxxx
Wed Aug 26 21:48:09 UTC 2009
Hello,
I'm using txt2tags for writing most of my stuffs. It has a clean syntax a bit similar to the markdown one.
http://txt2tags.sourceforge.net/
I'd like to be able to write txt2tags documents with geany, because I'm using Geany on a daily basis, and Geany has a killer feature which would be really cool with txt2tags: the symbols panel which can detect the headers in a document.
I'm not a programmer, so I find it difficult to understand the lexical sources for existing langages.
I tried to adapt the markdown one, which I suppose is located in LexMarkdown.cxx
for example in markdown for a header you can surround it by # like this : ## header 2 ##
On txt2tags it's == header 2 ==. So I replaced this in the source code of LexMarkdown.cxx and recompiled geany, but it's not working when I change the source to markdown (I just made this quick test by keeping the markdown name):
else if (sc.state == SCE_MARKDOWN_LINE_BEGIN) {
// Header
if (sc.Match("======"))
SetStateAndZoom(SCE_MARKDOWN_HEADER6, 6, '=', sc);
else if (sc.Match("====="))
SetStateAndZoom(SCE_MARKDOWN_HEADER5, 5, '=', sc);
etc...
Where could I start for getting txt2tags working with Geany?
More information about the Devel
mailing list