Re: [code] [scintillua] folder improvements

From: Tymur Gubayev <tymur.gubayev.att.gmail.com>
Date: Wed, 14 Mar 2012 19:50:13 +0100

Hi Mitchell,

I'm using in lua.lua:

M._foldsymbols = {
  [l.KEYWORD] = {
    ['if'] = 1, ['do'] = 1, ['function'] = 1, ['end'] = -1, ['repeat'] = 1,
    ['until'] = -1, ['else'] = 0, ['elseif'] = 0,
  },
-- rest unchanged
}

Actually, it would be much better if number 1 would be done by
scintilla, it's rather dirty workaround as of now. But then we will
probably need another workaround for 1+ :).

I also found a bug in my code due to how the fold function is called
(You notice it by editing lines with "middle"-keywords in them, but
refreshing syntax highlighting fixes it -- a workaround until i'm able
to fix the algorithm.)

Wbr,
 Tymur

On 14 March 2012 16:52, Mitchell <m.att.foicica.com> wrote:
> Hi Tymur,
>
>
> On Tue, 13 Mar 2012, Tymur Gubayev wrote:
>
>> Hi list,
>>
>> I just got some long time wanted (by me) feature of folding,
>> consisting of 2 things:
>> 1. The simple one: don't hide the very last line of fold block (I
>> like to see the 'end's)
>> 2. The one i really wanted: "fold in the middle", i.e. on "else",
>> "elseif", etc.
>>
>> [snip]
>>
>>
>> See possible realisation attached in lexer.patch.
>> (You need to add keywords to "M._foldsymbols" manually)
>
>
> This is a very clever trick :) Can you give example M._foldsymbols keywords?
>
> Mitchell
> --
> You are subscribed to code.att.foicica.com.
> To change subscription settings, send an e-mail to code+help.att.foicica.com.
> To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
>

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 14 Mar 2012 - 14:50:13 EDT

This archive was generated by hypermail 2.2.0 : Thu 15 Mar 2012 - 06:32:42 EDT