How do I create a custom fold in PowerShell
-
Is there a way to add a custom collapse option for PowerShell function Param() sections in the config file(s) for .psm1 files?
-
In general, where things fold is a function of the underlying lexer (from the Lexilla library that Notepad++ uses), and there isn’t customization available for that.
I think you could use one of the scripting plugins like PythonScript to add a custom fold point using a notification-on-change callback, and some of the commands, but I don’t know how stable custom folds are when Notepad++/Lexilla is also trying to control folding.
-
moderator note: I re-created your post under a different name; something about the previous title used is triggering a weird forum bug. Sorry to all the people who see, but cannot read, multiple copies with a similar name. I will try to clean up the database.
update: I think I’ve cleaned up the database; sorry for any who were confused by the extra empty/unavailble posts