Add settings to allow initial indentation for script and style
See original GitHub issueVolar uses the VS Code settings for indentation of code, but it doesn’t put an initial indent in for the script
or style
tags in vue
files. Could you add in a couple of settings that allows us to have that indent? I know the Vue default style may not have it, but to my eyes it looks horrible having opening and close tags with no indent. I’d like to have the indent option for auto-formatting.
Issue Analytics
- State:
- Created a year ago
- Comments:16 (14 by maintainers)
Top Results From Across the Web
Add settings to allow initial indentation for script and style
The issue is that VS2022 indents the script tag in the .vue files since it just sees it as an XML/HTML file and...
Read more >Indent script and style tags content in *.vue files · Issue #3888
"auto" - Avoid top-level indent for scripts and styles inside Vue files. This is the default value and reflects current behavior.
Read more >Indent the second line in Word
Setting an Indent style · Select the text where you want to add a hanging indent. · Go to Home > Paragraph dialog...
Read more >How to change indentation in Visual Studio Code?
Edit 1 · Step 1: Click on Preferences > Settings · Step 2: The setting you are looking for is "Detect Indentation", begin...
Read more >Code Style. JavaScript | IntelliJ IDEA Documentation
File | Settings | Editor | Code Style | JavaScript for Windows and Linux ... Configure or accept default prefixes that will be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, formatting the document after the fact removes the indentation, but having to type “enter + backspace” every time the user would have normally just had to type “enter” harms productivity.
This feature isn’t complete as long as this bug exists, so I thought it would be better to detail the problem here rather than create a new issue. But I’ll open a new issue if that’s appropriate.
I think if you select all and format selection it will remove the indentation. The specific bug seems to be the indentation given when you hit Enter, which does seem to give indentation if these are set to false. Perhaps worth opening an issue on that specific behaviour?