(feature request) separate hotkey for code fold/unfold

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 1
Joined: Sun Apr 20, 2025 9:44 am

(feature request) separate hotkey for code fold/unfold

Post by tongtong »

Ctrl + Shift + = is a default hotkey to toggle between folding and unfolding the whole code blocks and is very convenient when dealing with very large text file with thousands of lines.
But I usually double click on specific headline to unfold only parts of document and when done, press hotkey to revert it back to collapse-all state for future use.

However, I first have to expand all to collapse them, by pressing the hotkey twice.
for someone this would not be a problem but IMO this worsens the user experience for those who prefers to keep the document in collapsed state by default and expand the codeblock only when needed.


maybe giving user an option to decide for themselves would be great, or is there a workaround solution?
I can just forget about double clicks and use +/- buttons instead but it is so damned small and take a bit while to click.
thx

another request(or question) is if it is possible to make my own folding rule(for example, I want to enable folding only when the line starts with "#jonas" for .jonas extension). this is useful when using akelpad partly as outliner(I am not a programmer and I use code folding functionality as replacement for note taking app, so easier navigation is a must)

Offline
Site Admin
Posts: 6411
Joined: Thu Jul 06, 2006 7:20 am

Re: (feature request) separate hotkey for code fold/unfold

Post by Instructor »

However, I first have to expand all to collapse them, by pressing the hotkey twice.
You can assign hotkey in the Hotkeys plugin for the next commands:

Code: Select all

Call("Scripts::Main", 1, "EvalCmd.js", `AkelPad.SendMessage(AkelPad.GetEditWnd(), 3415 /*AEM_COLLAPSEFOLD*/, 0, 0x2|0x0 /*AECF_RECURSE|AECF_EXPAND*/)`)

Code: Select all

Call("Scripts::Main", 1, "EvalCmd.js", `AkelPad.SendMessage(AkelPad.GetEditWnd(), 3415 /*AEM_COLLAPSEFOLD*/, 0, 0x2|0x1 /*AECF_RECURSE|AECF_COLLAPSE*/)`)

...for example, I want to enable folding only when the line starts with "#jonas" for .jonas extension...
Yes it is possible. See Folds: section in coder files: [AkelPad]\AkelFiles\Plugs\Coder\*.coder
Post Reply