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

[html] Prevent single line auto-formatting for html attributes #4806

Closed
parliament718 opened this issue Mar 30, 2016 · 3 comments
Closed

[html] Prevent single line auto-formatting for html attributes #4806

parliament718 opened this issue Mar 30, 2016 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality html HTML support issues
Milestone

Comments

@parliament718
Copy link

Is there any way to prevent Visual Studio form auto-formatting html onto one line?

For example

<div ng-repeat="item in items"
     ng-class="item.classes"
     ng-init="i = $index">
</div>

Gets auto-formatted to:

<div ng-repeat="item in items" ng-class="item.classes" ng-init="i = $index">
</div>

This seems unreasonably opinionated, especially since many frameworks these days take advantage of element attributes. It's not nice to have 5+ attributes on one line and is the reason I've avoided auto-formatting my html, as much as I would REALLY like to be able to.

@Tyriar
Copy link
Member

Tyriar commented Mar 31, 2016

@parliament718 here is a list of the options available for the formatter #4066

@Tyriar Tyriar added the languages-basic Basic language support issues label Mar 31, 2016
@aeschli aeschli added this to the Backlog milestone Apr 1, 2016
@aeschli aeschli added html HTML support issues feature-request Request for new features or functionality and removed languages-basic Basic language support issues labels Apr 1, 2016
@aeschli
Copy link
Contributor

aeschli commented Apr 1, 2016

We're currently using the HTML formatter from https://github.com/beautify-web/js-beautify. Maybe you can file your request (which I think is reasonable) there as well.

@aeschli aeschli changed the title Prevent single line auto-formatting for html attributes [html] Prevent single line auto-formatting for html attributes Apr 1, 2016
@aeschli
Copy link
Contributor

aeschli commented Apr 25, 2016

duplicate of #2204

@aeschli aeschli closed this as completed Apr 25, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality html HTML support issues
Projects
None yet
Development

No branches or pull requests

3 participants