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 of switch/case/default #7

Closed
marudor opened this issue May 25, 2015 · 4 comments
Closed

Indentation of switch/case/default #7

marudor opened this issue May 25, 2015 · 4 comments

Comments

@marudor
Copy link

marudor commented May 25, 2015

Hey,
I really like the indentation and syntax highlighting the only thing bugging me is the non existing indentation of switch statements.
Currently this is the indentation provided:

switch(foo) {
  case 0:
  bar = batz;
  break;

I would love if you could make it like this:

switch(foo) {
  case 0:
    bar = batz;
    break;

Would increase readability by a lot.

@gandm
Copy link
Owner

gandm commented May 25, 2015

Yes I'm aware of this. I took it out to try to match the behaviour of the default atom provided language-javascript package. They removed it here to avoid problems. I'll investigate what affect it has and will update this issue with any findings.

@gandm
Copy link
Owner

gandm commented May 28, 2015

I've added indent to case and default switches. Seems OK but you have no automatic outdent. Hope this works for you. Fixed in 0.6.1

@gandm gandm closed this as completed May 28, 2015
@marudor
Copy link
Author

marudor commented May 28, 2015

Well without automatic outdent I would prefer to have it like the default atom package.
As I think a the indent should prefer stability.
With no auto outdent you pretty much loose the ability to use the auto indent feature.

While before you could use auto indent it just messes a bit with the switch statement.
Sorry to have you add it and (may) remove it again. But if we currently have no way to make it work with outdent we should stick to the behavior we had before.

@gandm
Copy link
Owner

gandm commented May 28, 2015

Ok i'll remove it and push out a patch.

@gandm gandm reopened this May 28, 2015
@gandm gandm closed this as completed May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants