Re: [textadept] TextAdept and ProFont

From: mitchell <c....at.caladbolg.net>
Date: Wed, 17 Nov 2010 11:56:50 -0500 (Eastern Standard Time)

Hi,

>> Other question: is it possible to fold all block, or all blocks of a
>> certain "level" (like notepad++, sorry) ? Did somebody already do that
>> ?
>>
> There is some folding code on the wiki. To get what you describe you
> could loop through all lines, check the indentation level and fold if
> necessary.
> To get the current indentation of a line you need something like this:
> local line = buffer:line_from_position(buffer.current_pos)
> local indentation = buffer.line_indentation[line]

If your question is about folding/folding a particular fold level, then
use buffer.fold_level[line]. Robert's suggestion works for folding by
indentation, but lexers can specify their own fold methods.

mitchell
Received on Wed 17 Nov 2010 - 11:56:50 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:53:54 EST