question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML auto formatting using spaces instead of tabs

See original GitHub issue

From @alan-agius4 on July 31, 2018 7:36

  • 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

Copied from original issue: Microsoft/vscode#55423

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cpswaimcommented, Mar 14, 2019

Just had the opportunity to test. Manually upgraded js-beautify (to 1.9.0) in the sublime plugin I am using, and initial tests look great. Thank you!

1reaction
bitwisemancommented, Dec 6, 2018

@aeschli @alan-agius4 @cpswaim This should be fixed in 1.8.10-beta1. See #1572.
I’m not ready to release widely as it changes the way indenting and alignment are handled throughout the project and could have side-effects for projects that use tabs.

Please have look and if you have people who are willing to try it out that’d be great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format code with spaces, tabs, and line breaks
An important aspect of code style is how to format the code, that is, how to use whitespaces, tabs, and line breaks to...
Read more >
Spaces are inserted instead of tabs - Visual Studio Feedback
In C# I never see tabs, because Tabs are automatically replaced by spaces (4 spaces ... and then Text Editor > Advanced >...
Read more >
How to indent as spaces instead of tab?
I am coding some html templates in JADE files. I want to auto indent code with spaces instead of tab. I tried shiftwidth=2...
Read more >
Indentation Settings - Tab
Indentation settings determine the size of the tab stops, and control whether the Tab key should insert tabs or spaces. In addition to...
Read more >
VS Code tips — Indentation settings and the ... - YouTube
VS Code shows the indentation settings for the current in the status bar. ... to quickly change the tab size or convert between...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found