On Monday 31 August 2009 04:39:33 am Joerg Desch wrote:
I'm using folding marks within comments with my long-time emacs installation. I'm using this marks to group functions or other variable declarations.
/*
*/ /* {{{ */
// the code...
/* }}} */
Is there a way to use these marks? I haven't found anything about "folding marks" in the manual.
I'm a newbie to Geany, and only a little experienced with Scintilla, but I'll try to answer your question anyway. (I am one of "all" ;-)
There are at least two answers (and I assume we're talking about C++ code).
You can revise or write a new lexer for Scintilla that handles those marks, or you can use the alternatives already defined in the C/C++ lexer for Scintilla, which are:
For opening:
//{
and, for closing:
//}
These don't work out of the box in Scintilla, you must set a specific property to make them work--let me see if I can find that...ahh, yes--you need to set the property "fold.comment=1" in a property file.
In Scite, I set it in my user property file: ~/.SciTEUSER.properties--I assume that Geany makes use of similar property files, somewhere, somehow.
There is a similar property available named fold.preprocessor=1 that is supposed to fold preprocessor stuff like #if #endif blocks--so far that hasn't worked for me, but I haven't tried very hard. ;-)
I'm almost sure these work only for C/C++ languages, specifically those lexed by the LexCPP.cxx lexer.
Hope this helps! Randy Kramer