Jump to content


Photo

notepad++ custom folding structure


  • Please log in to reply
3 replies to this topic

#1 thesoupmeat

thesoupmeat
  • Members
  • 188 posts

Posted 18 July 2012 - 10:59 PM

Notepad++ has collapsible sections support for C++ if you use braces. For example,
Posted Image

How can I make this happen for AHK's labels? For example, it would look like
Posted Image

#2 tidbit

tidbit
  • Moderators
  • 2291 posts

Posted 18 July 2012 - 11:07 PM

that is something to ask the NP++ community.
However, RaptorX did make a NP++ mod (or something like that) which does modify the folding (not sure how. been a while since I tested it).

have a search around.

#3 Lexikos

Lexikos
  • Administrators
  • 8853 posts

Posted 19 July 2012 - 08:35 AM

For any Scintilla-based editor such as Notepad++, highlighting and folding are both up to the lexer for the current language. Most of the lexers are built into the Scintilla control, coded in C++. Basically, whoever coded the highlighting for that language must have also implemented folding a specific way, or chosen to not support folding. I presume user-defined languages in Notepad++ use a specific lexer; I have no idea whether/how it supports folding. RaptorX's "mod" adds a lexer for AutoHotkey.

#4 dbear

dbear
  • Guests

Posted 04 August 2012 - 04:06 PM

The current lexer for Autohotkey in Notepad++ folds on braces and also on the commenting pair ";***" for starting the fold and ";*" for closing the fold. So you could simluate the folding you want by something like this:
MyLabel:
;***
code statements
more code statements
;*