Typing <html>
automatically creates </html>
after your cursor in Brackets:
But when you press enter it just puts the closing tag on the next line:
To begin adding code I need to press (enter *
2), up arrow, tab (too many steps).
How can I do this automatically so that pressing enter results in:
Couldn't find an extension that does this.
This works natively in CSS, why not in HTML?
Press enter followed by (CMD on Mac or CTRL on PC) + shift + enter
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!If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With