Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA autoclose HTML tags, how do I disable it?

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.

like image 855
user350325 Avatar asked Nov 21 '10 17:11

user350325


People also ask

How do I stop HTML auto closing tags?

First, go to the Settings and search for "HTML: Auto Closing Tags" and uncheck the setting that is checked by default.

How do you close a tag?

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 /).

How do I close a tag code in Visual Studio?

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.


2 Answers

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"

like image 162
Don Roby Avatar answered Sep 23 '22 20:09

Don Roby


This has changed, and is now Settings->Editor->General->Smart Keys

like image 38
Philihp Busby Avatar answered Sep 23 '22 20:09

Philihp Busby