Fix single line if/else and loop indentation for Typescript and PHP#136577
Merged
hediet merged 7 commits intomicrosoft:mainfrom Jul 7, 2023
Merged
Fix single line if/else and loop indentation for Typescript and PHP#136577hediet merged 7 commits intomicrosoft:mainfrom
hediet merged 7 commits intomicrosoft:mainfrom
Conversation
d021de1 to
16f501e
Compare
Contributor
Author
|
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. |
aviden
approved these changes
Aug 10, 2022
aviden
previously approved these changes
Aug 10, 2022
Contributor
Author
|
@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? |
Contributor
Author
|
@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
suggested changes
Feb 28, 2023
me21
left a comment
There was a problem hiding this comment.
Could you please add C/C++ languages support to this PR also?
Contributor
Author
I updated it to include C/C++. |
me21
approved these changes
Mar 4, 2023
hediet
approved these changes
Jul 7, 2023
TylerLeonhardt
approved these changes
Jul 7, 2023
Contributor
Author
|
Thank you, @hediet and @TylerLeonhardt! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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