Answer the question
In order to leave comments, you need to log in
SublimeText 3 html code auto alignment?
Good afternoon!
Can you please tell me if it is possible to set up SublimeText 3 in such a way that it automatically aligns/structures the html code when I insert/write it.
That's about what I want HTML code formatting tool
Maybe some kind of plugin. I can't figure out which one and how to set it up.
Answer the question
In order to leave comments, you need to log in
Use hotkeys on Reindent.
Open User Hotkeys and write
[
{
"keys": ["ctrl+shift+r"],
"command": "reindent",
"args": {
"single_line": false
}
}
]
There are built-in tools
Ctrl+Shift+P → Indentation: Reindent Lines
Bottom right where "Tab size: N" click and select: "Convert Indentation to Tabs"
The fact is that auto-formatting is not always required, sometimes (for me at least very often) you need to leave the original formatting in most of the code.
By default, code auto-formatting (indenting, auto-closing tags) is enabled. If you need to format the code - just select it (for reliability, you can still press Ctrl + J) and align with the built-in tools, the methods are given above (or through the context menu)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question