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

Not inserting brackets for else / else if #9

Open
Reewr opened this issue Nov 16, 2016 · 4 comments · May be fixed by #17
Open

Not inserting brackets for else / else if #9

Reewr opened this issue Nov 16, 2016 · 4 comments · May be fixed by #17

Comments

@Reewr
Copy link

Reewr commented Nov 16, 2016

Whenever I write an if-statement, followed by an else or else if, it won't automatically complete the brackets for them when I press enter.

As can be seen in the gif below.

example

@Reewr
Copy link
Author

Reewr commented Nov 17, 2016

It should be noted that the following does work:

if (something) {

}
else {

}

Seems like there's an issue when there's already an } on the same line as this:

function foo() {

} function bar() {

Causes the same issue as originally issued. The latter one is okay seeing as that is hardly ideal code, but many code-standards say to have the else-statement on the same line as the ending curly-brace of the if-statement.

@runiq runiq linked a pull request Dec 19, 2018 that will close this issue
@fritzrehde
Copy link

I still have this issue.

@alexmozaidze
Copy link

Issue is still there, it is also present for C and Rust.

@kkafar
Copy link

kkafar commented Jun 22, 2023

Bumping -- still facing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants