Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation: position of closing curly brace when typing { } in the opening line #3655

Closed
osergioabreu opened this issue Oct 25, 2023 · 3 comments
Labels
can't reproduce A developer couldn't reproduce the issue invalid

Comments

@osergioabreu
Copy link

osergioabreu commented Oct 25, 2023

If I write an "if" in languages that use curly braces puting { } in the same opening line, back the cursor 1 and press enter, the closing curly brace will be aligned with the code indentation. Could geany put the closing curly brace aligned with the opening "if" ?

if (true) {}     

Position cursor between { and } and press ENTER, results in:

if( true ){
    }
@b4n
Copy link
Member

b4n commented Oct 25, 2023

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)

@b4n b4n added waiting for information invalid can't reproduce A developer couldn't reproduce the issue and removed waiting for information labels Oct 25, 2023
@b4n b4n closed this as completed Oct 25, 2023
@osergioabreu
Copy link
Author

osergioabreu commented Oct 25, 2023

new information:
if I open the if with the open and close curly braces, 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. Result:

if( true ){
    }

@osergioabreu osergioabreu changed the title indentation: curly braces difference js x php (review all languages that use them?) indentation: position of closing curly brace when typing { } in the opening line Oct 25, 2023
@osergioabreu
Copy link
Author

osergioabreu commented Oct 25, 2023

Desired behavior is:
1- Add an empty line with one indentation
2- Put the } one line below the blank line, at the same direction of IF
3- Back the cursor at the blank line above, at indentation code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce A developer couldn't reproduce the issue invalid
Projects
None yet
Development

No branches or pull requests

2 participants