This project is read-only.

how to Custom folding

Topics: Developer Forum
Dec 8, 2009 at 1:50 AM

I want to folding by my keys, what can i do ?(My English is poor)

Dec 8, 2009 at 10:29 AM
Edited Dec 8, 2009 at 10:31 AM

I guess folding depends on your used lexer. So e.g. if you use cpp lexer it can fold at the occurrence of { or }.

Perhaps this Discussion can help you [link]

Dec 8, 2009 at 2:47 PM

Excuse me ,
Could you help me setting up mssql  support  the key   "  select   from "   to fold.
I don't know how to set lexer .Thank you very much.

Dec 8, 2009 at 3:38 PM

I think this is not possible with the buildin mssql language, the only possible folding seems to be for the Comments ( /* some Comment  */ ).

To achieve folding for some SQL statement I guess you have to write your own Lexer, which I've never done...

Perhaps Chris Rickard can help you with this problem.

Best Regards

Dec 8, 2009 at 9:01 PM

The mssql lexer supports folding at block comments, begin/end, and case statements. Make sure that you have a fold margin visible (default is Margins[2]) by giving it a non-zero width (20 should be enough).

Dec 10, 2009 at 12:47 AM
Edited Dec 10, 2009 at 8:31 AM

I want to configuration some things to Looks like the picture 

Dec 14, 2009 at 2:43 PM

you need to modify directly le SciLexer code source into the file LexMSSQL.cxx


into the function FoldMSSQLDoc

 you need to add this code source

if ((strcmp(s, "select") == 0) {
if (strcmp(s, "from") == 0) {





Dec 15, 2009 at 10:21 AM

HerveC ,Thank you very much!