-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
How may I tell the formatter, not to send my comments to a new line? #1337
Comments
I agree with pillaiindu. I have the same problem. I would like to see this implemented. |
@gunther3613 |
Yes please add this feature. I have the exact same problem. |
I unstared and stopped using js-beautify because of this issue. |
@pillaiindu Same, I came from Netbeans, where the only formatting it did was (mainly) alter indentation, but it seems like this just tries to do too much, and altering my newlines is as annoying as it gets. It's too bad Netbeans just isn't as all around a good editor as VS Code, but since then I've just manually been formatting my code and I haven't looked back to either |
@gkarapeev |
Using VSCode (1.37.1) with Beautify plugin installed (1.5.0) and set to default formatter on Linux it only works properly for me if I rewrite the comments next to the tag I want to have them. If I open a file having previously written comments and try to format it, HTML one-line comments move to the next line which is absolutely undesirable and annoying cause it "breaks" my already formatted file =( |
@gcjuan Please reproduce this on https://beautifier.io using the HTML beautifier. If it does happen there, please not the settings here. |
I cannot reproduce it on https://beautifier.io the way I do it in VSCode. It should mean there's a problem in the plugin implementation on the code editor cause it works time to time and depending if you've opened a file having already written comments or you write them afterwards. Thanks for all! |
Originally requested VSCode to implement this feature.
I put comments on ending divs like the following
I have also configured my emmet to put the closing div tag comments on the same line as the closing tag.
The problem:
When I format the document inside VSCode (my editor of choice) which uses js-beautify under the hood, it sends all of my closing div comments to the new line like the following,
Which is a problem for me, and I have to manually backspace them back to the closing div tags.
I requested VSCode team to provide a setting like "html.format.commentOnNewLine": true, which I set to false to get the desired effect, but they replied that they're using js-beautify under the hood which is doing the work, so I should file the feature here, which I did. :)
Thank You for the nice beautifier and the awesome work!
The text was updated successfully, but these errors were encountered: