[Geany-devel] Indentation using regex (was [PATCH 14/19] Rewrite tab switching queue)

Jiří Techet techet at xxxxx
Wed Sep 22 11:57:50 UTC 2010


On Wed, Sep 22, 2010 at 13:47, Lex Trotman <elextr at gmail.com> wrote:
> On 22 September 2010 20:47, Jiří Techet <techet at gmail.com> wrote:
>> Hi Lex,
>>
>> On Tue, Sep 21, 2010 at 02:41, Lex Trotman <elextr at gmail.com> wrote:
>>> Hi Jiri,
>>>
>>> Got it working, I'd put the regexes in the filetypes in the wrong
>>> prefix, my mistake :-D
>>>
>>> But it doesn't seem to be working as expected.
>>>
>>> Using only the first two of your regexes the following gets:
>>>
>>> class foo {
>>>    struct bar {
>>>        int i;
>>>    };
>>>    }
>>
>> This works for me - if you press }, it should get unindented. How did
>> you enter the code (copy-paste or something like that)?
>
> No, I just typed it in order from the first character to the last }.
> Note that the } before did undent correctly.  Any suggestions what to
> look at?

Hmm. Do you use "current chars" or "match braces" method? I use "match
braces" normally and I haven't tested "current chars" so much so there
might be some bugs. Also what line endings does your document have? I
had some problems with matching lines containing CRLF because CR
remained at the end of line and the pattern never matched. But this
one should be fixed. No more ideas right now.

Jiri



More information about the Devel mailing list