Re: [textadept] TextAdept and ProFont

From: Robert <ro....at.web.de>
Date: Wed, 17 Nov 2010 17:04:19 +0100

On Wed, Nov 17, 2010 at 12:11 PM, Jonas O. <ezjo....at.gmail.com> wrote:
> In fact I wanted to ask about brace highlighting, not brace matching;
> the way the corresponding braces highlights when the caret is next to
> a brace, not the keyboard short that make the caret go to the other
> brace.

The snippet I linked to does both - change the default highlighting of
Textadept to the way Scite does it (highlight matching braces before
and after a caret) and allow to go there with a keyboard short cut.

>
> 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]

Robert
Received on Wed 17 Nov 2010 - 11:04:19 EST

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