Re: Folding menu functions and/or hotkeys?

From: phayz <russelldicken....at.gmail.com>
Date: Tue, 27 Apr 2010 18:00:35 -0700 (PDT)

On Apr 27, 7:36 pm, Jay <robert.jay.go....at.gmail.com> wrote:
> This worked, thanks!
>
> On Mar 28, 8:33 pm, phayz <russelldicken....at.gmail.com> wrote:
>
>
>
> > On Mar 28, 10:46 am, mitchell <mforal.n....at.gmail.com> wrote:
>
> > > Hi,
>
> > > > I know that Textadept supports folding in that it will display folding
> > > > points in the margin. However if I want to fold all folding points, or
> > > > perhaps unfold them all, I can't find an appropriate menu option. Of
> > > > course Textadept's menu is fully customisable and technically I have
> > > > the ability to create such a menu. With previous entries to this group
> > > > however, I have proven that I don't have a clue what I am doing when
> > > > trying to customise Textadept.
>
> > > > Can someone give me some hints as to how I might do this? Or is this a
> > > > function that should not be added to Textadept?
>
> > > You can write a lua function to iterate over all buffer lines, check
> > > the fold state, and perform a toggle_fold as necessary.
>
> > > function collapse_folds()
> > >   for i = 0, buffer.line_count - 1 do
> > >     if buffer.fold_expanded[i] and buffer.line_visible[i] then
> > > buffer:toggle_fold(i) end
> > >   end
> > > end
>
> > > expand_folds() would be the same except 'if not fold_expanded ...'
>
> > > Mitchell
>
> > Mitchell and Robert,
>
> > I will try your suggestions as soon as I can and report the results
> > here. I want to use a "fold all folding points" and "unfold all
> > folding points" mainly so that I can use Textadpet as an outliner. I'm
> > hoping to indent various sections of text and have Textadept fold
> > according to the level of indentation.
>
> > Regards,
>
> > Russell Dickenson

Jay,

Congratulations! Would you mind sharing what you did? I generally have
difficulty customising Textadept, with my knowledge and skill way
behind my vision.

This feature/function is perhaps the next I was wanting to get
working, immediately after I resolve my problems with the paragraph
rewrap function.

Regards,

Russell Dickenson

-- 
You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to textadept.at.googlegroups.com.
To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
Received on Tue 27 Apr 2010 - 21:00:35 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:41:04 EST