[Geany-Users] Bracket autocompletion inside other brackets

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Geany-Users] Bracket autocompletion inside other brackets

Amir Teymuri
I have auto-close functions for brackets enabled in geany
(preferences>editor>completions). Typing a new bracket inside of another
cuases a single bracket and not a completed-closed bracket-couple:

(()
[[]
{{}

Is there a way to manipulate geany to close any number of brackets and
Everywhere they would come?

Regards,

--
sent from debian
               --

_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Geany-Users] Bracket autocompletion inside other brackets

Lex Trotman
Geany only inserts the close bracket if the open bracket would be
unmatched.  Of course if you add an open bracket inside a pair of
brackets then it will be matched by the close bracket of the existing
pair, so no new bracket is added, even though the existing open
bracket is now unmatched.

I don't know what the justification for this is, but its been that way
for as long as Git has recorded (back to Geany 0.40) so nobody has
ever found it bad enough to change, or at least not worth the effort.

Making the bracket matching algorithm more sophisticated may
potentially require matching the whole file, and potentially be
language specific if a bracket is also validly part of other tokens
making improving it fairly significant.

On 8 May 2016 at 09:28, amir teymuri <[hidden email]> wrote:

> I have auto-close functions for brackets enabled in geany
> (preferences>editor>completions). Typing a new bracket inside of another
> cuases a single bracket and not a completed-closed bracket-couple:
>
> (()
> [[]
> {{}
>
> Is there a way to manipulate geany to close any number of brackets and
> Everywhere they would come?
>
> Regards,
>
> --
> sent from debian
>               --
>
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Loading...