-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
JavaScript if block without brackets indentation #30933
Comments
@mjbvz do you think our |
Related issues #31027 |
I think enough libraries and developers do write single statement |
@mjbvz I'm thinking about taking one step back on Right now I don't know how to make the regex aware of context in this case. |
Yes I think the expected behavior here would be to indent the next line only if there is no other content after the cursor. Would we be able to achieve that without |
Expected behaviour should be same as pre 1.14, please. |
I am having this exact same issue, but i can't find the |
Does anyone know what feature addition/change caused this to occur? I'm interested in understanding why this change came in as it impacts me every time I write control flow code ( |
A temporary work-around is to downgrade to version 1.13. |
OK, I'm back - I don't have any setting with @rebornix Why can't the feature that was added in 1.14 be removed - this is really annoying |
@davidstlyoui This issue hasn't actually been closed. I think Github is just displaying the duplicate message incorrectly for this issue. |
@rebornix Have you had a chance to take another look into this issue? |
@simonl65 It looks like he closed it as part of this commit. It looks like typing "Fixes [Issue #]" into the commit message will also close that issue as part of the workflow. See this help page. |
@simonl65 I closed this issue with a change that should resolve the problem. Please try it out in the next VS Code insiders builds |
I just learned something! Thanks - I'll give that a try when vscode next updates. |
Hmm, so I couldn't wait - I downloaded the insiders build (1.15.0-insider)! Sorry to say - it's worse! I now get the following: if(x)
{ ...that's four spaces before the If it helps, my non-default settings are: {
"editor.insertSpaces": false,
"editor.tabSize": 2,
"workbench.sideBar.location": "left",
"editor.wordWrapColumn": 82,
"editor.renderIndentGuides": true,
"editor.rulers": [
82,
120
],
"window.zoomLevel": 0,
"workbench.iconTheme": "vscode-great-icons",
"workbench.colorTheme": "Visual Studio Dark",
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
} This is a clean install of 1.15.0-insider - no extensions added. What have I missed? Question: Why can't the auto-indent stuff just revert to how things were in 1.13 - that worked fine? |
@simonl65 This change just went in and is not yet in any build. You need to wait for the next nightly insiders build to pick up this change |
@mjbvz Oops - over eager! Will try it tmz. Thanks for your efforts 👍 |
@mjbvz Sorry to say: it's not changed - still indenting the BTW: Correct behavior in PHP - this affects JS & TS. This is a real PITA |
@simonl65 Please record a gif of exactly what you are seeing. Here's what I see: |
@mjbvz Not sure how to ad a gif, so here are the steps:
Expected result:
|
@mattbierner This is on the insiders build (1.16.0), I believe it's the same issue. |
The original issue still reproduces in 1.15. It is not fixed! |
watch me shift these lines down. ^. it expected that these lines do not get indented on shift. doh! is this the correct place for this report, @mjbvz, or shall i add my GIF elsewhere? thx :) |
@Rxswyers Yes. That is exactly the issue. It is truly frustrating. |
@cdaringe I'm not sure that's the same issue - I guess you're using I don't get that in a javascript file either - which language mode are you in? |
Can someone re-open this issue since it is not fixed? Otherwise I will probably file it again. It's really annoying. |
yep!
javascript language setting. |
The original reported issue was fixed. I've opened #32653 to track to track the other case discussed in the comments |
@mjbvz But that isn't the case at all. Here's what the original reported issue read as:
As explained in many subsequent comments, this is still an issue. You happened to fix a related bug, just not the one described in this issue. Your fix gif shows that you type |
@mjbvz - the original issue I reported does still reproduce for me in 1.15 following the same steps. It's not fixed. |
It's fixed in the insider release. Be patient for it to get to the stable build. @AshleyScirra |
Yay - that fixed it! @mjbvz Thank you. |
@mjbvz its still not fixed, just grabbed the latest version on a different fresh installed cmputer and this is still here. This is ridiculous. |
@azarus I don't think the fix has made it to the release version yet. I'm guessing you're on version 1.15.x, but the fix is in 1.16.0-insider - which you can download from https://code.visualstudio.com/insiders |
Awesome.
…On 28 Aug 2017 21:21, "simonl65" ***@***.***> wrote:
@azarus <https://github.com/azarus> I don't think the fix has made it to
the release version yet. I'm guessing you're on version 1.15.x, but the fix
is in 1.16.0-insider - which you can download from
https://code.visualstudio.com/insiders
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30933 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFlNcxMxLu9wF6vlKh-juUNjNSuRPji6ks5scszrgaJpZM4ObYuY>
.
|
Steps to Reproduce:
As of the 1.14 update, typing JS code has really annoying indentation behavior. I can't figure out why it changed and I can't find any relevant settings to try to change.
To reproduce, type this:
if (cnd)
<enter>
{
Expected result (pre-1.14):
Observed result (1.14):
This is the worst indentation style!
The text was updated successfully, but these errors were encountered: