Re: Adding auto-close brackets, braces and string
Hi,
Thanks for the feedback ! Your advices and tips are appreciated :)
On Sun, 30 Nov 2008, Enrico Tröger wrote:
> On Fri, 28 Nov 2008 05:55:25 +0100 (CET), ioguix@... wrote:
>
>> Hi,
>>
>> First of all, thanks for this great piece of code that is Geany !
>>
>> Now, I would like to use auto-close brackets, brace and string in
>> Geany. As it doesn't looks very complicated, it could be a fairly easy
>> feature to implement for a first time contributor like me.
>>
>> So here is my proposal:
>> These options will auto-close ( [ { ' and " while typing, positionning
>> the cursor between the pair.
>> Nothing really revolutionar here as some IDE already implement that.
>> Moreover, it sounds this cannot be done using snippets and I can't
>> seriously think about doing a plugin for such a feature (I'm not even
>> sure it's fesable). So I believe it belongs to Geany's core.
>
> As long as it is configurable(i.e. I can disable it :D) I'm fine with
> this. We already have the basic code for this in Geany, even
> though it's only used for LaTeX right now.
> Check auto_close_bracket() in src/editor.c. Remove the check for the
> lexer == latex and add the missing characters (currently it only works
> for { and [.
(Continue reading)