On Sun, 1 Aug 2010 22:48:49 +1000, Lex wrote: >On 1 August 2010 22:35, Daniel Carrera <[email protected]> wrote: >> I have a new customization question. >> >> Background: Here is a feature I really like about Geany: When you are >> in HTML or PHP mode, and you type "<table>", Geany not only closes >> the table tag, but it fills the table with a blank row and cell: >> >> <table> >> <tr> >> <td> </td> >> </tr> >> </table> >> >> Notice how it is already indented and everything. >> >> >> Now, what I want is for Geany to do something similar with curly >> brackets. Suppose I type some if-statement: >> >> if (2 > 1) { >> >> The moment I type the open curly bracket, I would like Geany to put a >> closing bracket two lines down and add an indentation to the space >> between the brackets: >> >> if (2 > 1) { >> <indented> >> } >> >> >> Is something like this possible? >> >> The way Geany behaves currently is slightly annoying. Yes, it closes >> the bracket, like this: >> >> if (2 > 1) {} >> >> And when I press "Enter" Geany just goes one line down and indents >> the bracket: >> >> if (2 > 1) { >> } >> >> >> This is never what I want. So I just end up de-activating the bracket >> completion for curly brackets because what Geany does is more >> annoying than useful. But it would be really great if it could do >> what I actually want: >> >> if (2 > 1) { >> <indented> >> } >> >> Any chance for this? > >There are problems with auto indentation if there is anything on the >line after the { ie the }. It is waiting for someone to have time to >fix it.
Alternatively, or for the time waiting for a fix, you can get what you want using snippets. There is a default snippet for if statements which does quite what you want, IIRC. Regards, Enrico -- Get my GPG key from http://www.uvena.de/pub.asc
pgpenbe9mPBMq.pgp
Description: PGP signature
_______________________________________________ Geany mailing list [email protected] http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
