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 auto formatting using spaces instead of tabs #55423

Closed
alan-agius4 opened this issue Jul 31, 2018 · 5 comments
Closed

HTML auto formatting using spaces instead of tabs #55423

alan-agius4 opened this issue Jul 31, 2018 · 5 comments
Assignees
Labels
html HTML support issues info-needed Issue requires more information from poster

Comments

@alan-agius4
Copy link

alan-agius4 commented Jul 31, 2018

  • VSCode Version: 1.25.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Set "html.format.wrapAttributes": "force-aligned" or "html.format.wrapAttributes": force-expand-multiline in the workspace settings
  2. Set indent_style to tabs in .editorconfig for html
[*.{cshtml,html}]
charset = utf-8
indent_style = tab
  1. Format an html file.

image

image

I would expect that tabs are using instead of spaced.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented Jul 31, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the html HTML support issues label Jul 31, 2018
@aeschli
Copy link
Contributor

aeschli commented Jul 31, 2018

What is the tab/spaces setting for your editor? Check out the lower right corner.

To sync settings in .editorconfig with the vscode settings, check out https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

@aeschli aeschli added the info-needed Issue requires more information from poster label Jul 31, 2018
@alan-agius4
Copy link
Author

alan-agius4 commented Jul 31, 2018

Hi @aeschli my setting is Tab Size: 4
image

If I format the document, I can see that spaced are being changed to tabs but not for wrapAttributes, these are always spaces.

html format vscode

@aeschli
Copy link
Contributor

aeschli commented Sep 14, 2018

reproduced on the https://beautifier.io/ playground:

  • use tab as indent character
  • set line length to 40
  • custom settings:
{
  "wrap_attributes":   "force-aligned"
}

format the following code

<html>
<body>
    <div a=asdsd b=addasdas c=adadasda d=ASasS>
    </div>
</body>
</html>

Spaces are used to indent the attributes
image

@aeschli
Copy link
Contributor

aeschli commented Sep 14, 2018

This issue was moved to beautifier/js-beautify#1551

@aeschli aeschli closed this as completed Sep 14, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html HTML support issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants