I am new to Brackets.io and thought I saw a shortcut key to auto indent/format HTML, however I cannot find a shortcut. Is there a shortcut or add-on that will do this for me?
-
See http://superuser.com/q/838323/388554 – T J Jun 24 '16 at 06:46
6 Answers
I found an add-on for Brackets.io that uses auto-indent called Indentator.
It uses shortcut keys Ctrl + Alt + I

- 337
- 1
- 5
- 14

- 1,919
- 1
- 13
- 17
-
6Did you install the Indentator add-on? I just confirmed it works well on the current version of Brackets (1.8). First go to File > Extension Manager and search for Indentator. Upon completion of installation, use Crtl + Alt + i and it should work without issue. – Zac Smith Nov 15 '16 at 21:45
-
This works fine, but only on the whole file, not on the selected code only – gevra Jan 25 '17 at 02:30
-
-
The author clearly missed the chance to name it as the **Indent-inator** (you read it in Doof's voice, didn't ya?) ;) – varun Aug 26 '19 at 09:02
You can install an indentator package.
Click on File > Extension Manager....
Look for the search field and type: Indentator > Install
Once Indentator is installed, you can use Ctrl + Alt + I

- 8,965
- 6
- 43
- 46
-
-
1In the down-right corner -> click on "tab size" (changes to "spaces") then click on the value to change it. (taken from some Brackets repository issue) – Machado Nov 04 '18 at 01:38
-
After Indentator installation, menu is "Edit" > "Indent Document" (Ctrl + Alt + I) – Park JongBum Jan 05 '20 at 10:37
-
Beautify does a good job. It provides a "Beautify on save" option, so that you may use ctrl+s to reformate html, less, css, etc

- 1,156
- 9
- 13
-
1
-
It is in **edit** after installation and can be called with **Ctrl alt B** – Timo Nov 20 '20 at 15:20
The Identator plugin works to me in Brackets Release 1.13 versión 1.13.0-17696 (release 49d29a8bc) on S.O. Windows 10

- 11
- 1
I've been playing around with the preferences and added the following to my brackets.json
file (access in Menu Bar: Debug: "Open Preferences File").
"closeTags": {
"dontCloseTags": ["br", "hr", "img", "input", "link", "meta", "area", "base", "col", "command", "embed", "keygen", "param", "source", "track", "wbr"],
"indentTags": ["ul", "ol", "div", "section", "table", "tr"],
}
dontCloseTags
are tags such as<br>
which shouldn't be closed.indentTags
are tags that you want to automatically create a new indented line - add more as needed!- (any tags that aren't in above arrays will self-close on the same line)

- 8,481
- 4
- 46
- 51