Customize Editor.ahk custom/comment folding

Script editor, GUI designer, debugger and tools for AutoHotkey
Posts: 18
Joined: 06 Jun 2020, 23:15

Customize Editor.ahk custom/comment folding

08 Jul 2020, 07:48

Screenshot explains what I'm trying to get.

[url=https /]Image[/url] Broken Link for safety Broken Link for safety

My knowledge about scintilla and lexers is around zero. So thats all I could figure out. With no succes. How to "force" scintilla to get this folding style?

Code: Select all

	If (g_CodeFolding) {
		Sci[n].SetProperty("fold", "1")
		Sci[n].SetProperty("fold.compact", "0")
		Sci[n].SetProperty("fold.comment", "1")
                Sci[n].SetProperty("fold.explicit.start", ";{")
                Sci[n].SetProperty("fold.explicit.end", ";}")
User avatar
Posts: 1168
Joined: 06 Oct 2015, 21:39

Re: Customize Editor.ahk custom/comment folding

09 Jul 2020, 14:49

No idea. Maybe try "fold.ahk.explicit.start" and "fold.ahk.explicit.end"? I think this may be dependent on the lexer code though and not configurable from script unless the lexer supports it.
User avatar
Posts: 373
Joined: 05 Oct 2015, 16:41

Re: Customize Editor.ahk custom/comment folding

30 Aug 2020, 17:48

You can simply do this:

Code: Select all

AHK syntax allows a block of code to be enclosed in braces, so there is no need to suppose the existence of parameters for the definition of folding tokens. The AHK lexer has no specific folding properties. Scintilla natively has four: fold, fold.compact, fold.comment and fold.preprocessor.

Return to “AutoGUI”

Who is online

Users browsing this forum: No registered users and 2 guests