great idea, not silly at all. this creates a "permanent" fold with a 
clickable toggle. Folding ad-hoc selections do not behave as neatly when 
you fold-unfold the entire document or something of that nature.

On Thursday, November 29, 2018 at 10:05:53 AM UTC-5, Jim Danner wrote:
>
> Another (slightly silly) idea: put those definitions of constants inside a 
> loop that doesn't really do anything, like
>
> def myfunction():
>     for i in [1]:
>         constant1 = 10
>         constant2 = 'hello'
>         ....
>     rest of the function code
>
> This for-lop (which runs just once) will be folded by BBEdit.
>
> On Thursday, November 29, 2018 at 3:13:30 PM UTC+1, Gauvins wrote:
>>
>> I have a long list of constants at the top of a function. Would be great 
>> if is could be collapsed, like what happens with def / comment_blocks / """ 
>> strings """ and such. 
>>
>> I cannot find a command that would "create a fold", or a way to define 
>> custom regions. I do not wish to spend a significant amount of time to 
>> rewrite the code merely to be able to collapse this sub-section. 
>>
>> Any suggestion?
>>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to