-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Fix single line if/else and loop indentation for Typescript and PHP #136577
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
Conversation
d021de1 to
16f501e
Compare
|
I rebased this to fix a merge conflict. It's a fairly simple change that would solve a pretty annoying daily issue. It would be great if this could get merged. |
|
@rebornix, is there anything else I need to do to get this PR merged or is it just waiting on someone to have time to review it? |
|
@hediet, if you could look at this one, I'd really appreciate it. Basically, it adds a deindent after single line code for PHP/TS/JS. For example, if you put your cursor where the if (1)
1;| |
me21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add C/C++ languages support to this PR also?
I updated it to include C/C++. |
|
Thank you, @hediet and @TylerLeonhardt! |
This PR addresses #43244. It does not solve the all the issues in there. In particular, while I like single line
ifstatements without brackets, I don't want VS Code to assume all myifstatements are going to be a single line for 2 reasons:ifversus having to hit backspace if it were to assume it's going to be one line.Here are the parts addresses:
ENTERafter a single lineif.Below are some sample files to test with.
Typescript
PHP