If I write an "if" in javascript that use curly braces, the behavior of Geany if fine, as it closes the curly brace exactly in the direction of the opening if. BUT when I do this in PHP file, the closing curly brace is put one TAB to right, forcing the user to delete the extra TAB. Should be reviewed in all languages that use curly braces ? It is at least an inconsistency in Geany.
Right behavior (ex: javascript)
if ( acondition == 1 ){ code; } // <--- closing indentation ok in javascript
Geany with PHP file now is doing this:
if ( $acondition == 1 ){ code; } // closing bad indentation
Works for me, be it with *current characters* or *matching brace* indentation methods. Note however that auto-indentation here will not happen if you have something on the right of the cursor when typing the closing brace.
What is you version of Geany? Does disabling plugins help? (`geany -p`) Maybe try a fresh configuration (`geany -c /tmp/tempconf`)
I can not reproduce it anymore, please remove the topic untill I can reproduce, and I will recreate. I saw the bug once but I can not reprocuce right now. Please delete the topic. Tks
Closed #3655 as completed.
new information: if I open the if with the open and close bracks, could geany put the closing at the correct place? So it is a feature request. Type:
if ( true) {} Back the cursor 1 char, to be between the curly braces and press ENTER.
Desire behavior is: 1- Add an empty line with one indentation 2- Put the } one line below this line at direcition of IF 3- Back the cursor at the blank line above, at indentation code.
github-comments@lists.geany.org