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