FR: Code Fold Selected text?
FR: Code Fold Selected text?
Would it be possible to select some text and Right-Click and have options to fold/unfold the selected sections in full?
Live for an ideal and leave no place in the mind for anything else.
-
main Alexey
- Posts: 3004
- Joined: 25.08.2021 18:15
Re: FR: Code Fold Selected text?
Cmd Palette has command for this: "fold selected lines". it works best when no lexer is active.
Re: FR: Code Fold Selected text?
Ah ok, that's great, I really only need Fold mostly. But would it be possible to have a Toggle Fold command? Just to reduce buttons. Because the toolbar gets overcrowded if you have to have a button to do both things separately.
I don't suppose there's a plugin for adding these to the Editor's Context Menu?
Thank you.
EDIT: Shame, doesn't seem to work for INI files!
I don't suppose there's a plugin for adding these to the Editor's Context Menu?
Thank you.
EDIT: Shame, doesn't seem to work for INI files!
Live for an ideal and leave no place in the mind for anything else.
-
main Alexey
- Posts: 3004
- Joined: 25.08.2021 18:15
Re: FR: Code Fold Selected text?
Now I see that command 'fold sel lines' is not compatible with tree-helpers like Markdown, Ini files. I will add note in my todo-list for future.
>there's a plugin for adding these to the Editor's Context Menu?
Using the Configure_Menu plugin, you can add commands to the context-menu. See the 'Configure Menu' topic at https://wiki.freepascal.org/CudaText_plugins
>But would it be possible to have a Toggle Fold command?
sorry, no such Toggle command. you need to use another command from Cmd Palette, like 'toggle block at current line' or 'unfold block at current line'.
>there's a plugin for adding these to the Editor's Context Menu?
Using the Configure_Menu plugin, you can add commands to the context-menu. See the 'Configure Menu' topic at https://wiki.freepascal.org/CudaText_plugins
>But would it be possible to have a Toggle Fold command?
sorry, no such Toggle command. you need to use another command from Cmd Palette, like 'toggle block at current line' or 'unfold block at current line'.
Re: FR: Code Fold Selected text?
ok, that's great, thanks Alexey! 
Live for an ideal and leave no place in the mind for anything else.