41
SlickEdit® / Code Fold/Unfold
« Last post by gkl on December 04, 2023, 11:27:54 PM »Dear All,
I am new to SlickEdit and I have found the following code for folding/unfolding code blocks:
_command void hs2_plusminus() name_info(',' VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL)
{
int pm = _lineflags() & (PLUSBITMAP_LF|MINUSBITMAP_LF);
if ( !pm )
{
if (select_active()) hide_selection();
else hide_code_block();
}
else plusminus();
}
Could someone point me to the right direction for binding it to a single mouse click on the left margin (next to the line numbers) and make it available for all file types?
Regards,
George
I am new to SlickEdit and I have found the following code for folding/unfolding code blocks:
_command void hs2_plusminus() name_info(',' VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL)
{
int pm = _lineflags() & (PLUSBITMAP_LF|MINUSBITMAP_LF);
if ( !pm )
{
if (select_active()) hide_selection();
else hide_code_block();
}
else plusminus();
}
Could someone point me to the right direction for binding it to a single mouse click on the left margin (next to the line numbers) and make it available for all file types?
Regards,
George