Customize Editor.ahk custom/comment folding

Old Topics related to the original "AutoGUI" ahk script editor.
johans2
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 postimages.org /]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", ";}")
		SetCodeFolding(n)
	}
User avatar
kczx3
Posts: 1640
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
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Customize Editor.ahk custom/comment folding

30 Aug 2020, 17:48

@johans2
You can simply do this:

Code: Select all

{
    MsgBox
}
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 “Old Topics”

Who is online

Users browsing this forum: No registered users and 6 guests