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?
On Wed, 26 Aug 2009 21:48:09 +0000 (GMT) Forgeot Eric eforgeot@yahoo.fr wrote:
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):
I don't know much about Scintilla lexers myself, but the MarkDown one seems to have other handling for the '=' and '#' chars which may need changing. I would cut out all the code you don't need for your lexer.
Where could I start for getting txt2tags working with Geany?
Try the HACKING file for how to add a filetype.
Regards, Nick