In IntelliJ IDEA, when I am editing an HTML file and open a tag for example <td>
it will automatically add the closing tag </td>
right after it.
I find this intensely irritating 98% of the time and only slightly useful the remaining 2% but I cannot figure out how to switch it off.
First, go to the Settings and search for "HTML: Auto Closing Tags" and uncheck the setting that is checked by default.
An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag <p> and close it with a closing paragraph tag </p> (closing tags always proceed the element with a /).
Auto Close TagAs soon as you type the > in an HTML element, like the last bracket in <div> , the closing tag is automatically created for you. It can be configured to only auto close after you've typed the </ to indicate you're about to close a tag, which is a default in Sublime Text 3.
Navigate to Settings->Editor->Smart Keys
Uncheck "Automatically Insert Closing Tag" in the XML/HTML section.
In IntelliJ 15+, this has moved here (thanks @Philihp Busby):
Settings -> Editor -> General -> Smart Keys -> "Insert closing tag on tag completion"
This has changed, and is now Settings->Editor->General->Smart Keys
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