Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable autocompletion for quotation marks when writing HTML attributes in PhpStorm?

I'm new to PhpStorm and I'm loving it, but can't find how to disable the autocompletion of double quotation marks when I write HTML tags' attributes. I'm used to not put them and it's very annoying for me.

like image 405
GabAntonelli Avatar asked Nov 15 '13 04:11

GabAntonelli


People also ask

Do you need quotes for HTML attributes?

The HTML standard does not require quotes around attribute values. However, W3C recommends quotes in HTML, and demands quotes for stricter document types like XHTML.

Should html5 attribute values be enclosed in quotes?

The HTML specification says: Attributes are placed inside the start tag, and consist of a name and a value, separated by an = character. The attribute value can remain unquoted if it doesn't contain spaces or any of " ' ` = < or > . Otherwise, it has to be quoted using either single or double quotes.

How do I turn off auto suggestion in IntelliJ?

Here's the solution: Go to Settings > Editor > General > Code Completion. Then, UNCHECK the box that says "Insert selected variant by typing dot, space, etc." See screenshot below.


2 Answers

In PhpStorm v7.0 it is not possible.

But it is fixed for v7.1 -- http://youtrack.jetbrains.com/issue/IDEA-113332

Option "Automatically add quotes for attribute value" added to IDE "Settings | Editor | Smart Keys".

Either wait for v7.1 to be released .. or try EAP build.

like image 195
LazyOne Avatar answered Oct 07 '22 19:10

LazyOne


Note that the setting has in versions > 7.1 been moved to: Settings -> Editor -> General -> "Smart Keys".

Here you can disable them from being added after attributes equal sign. You can also disable them so they don't automatically close.

like image 40
Zaerdna Avatar answered Oct 07 '22 19:10

Zaerdna