HTML & Soft wrapping
Hi,
when editing HTML with PhpStorm, I frequently run into situations where PhpStorm’s wrapping behaviour is driving me mad.
For instance, I have a line like this one:
<label for="some-id">Field label<span>*</span></label>
Now, I insert the cursor before the closing “>” of the opening “span” tag, in order to insert “ ”. But, as soon as I hit the space bar, PhpStorm inserts a hard linebreak and the rest of the line (“>*</span></label>”) is moved to the next line. (Note aside: Of course, in reality, the line is much longer and the insertion point is actually near the right window boundary.)
No matter, what combination of Preferences > Code Style > HTML > “Wrap attributes” and Soft wrapping I use – I haven’t yet managed to turn this off. I’d like PhpStorm to just break the line visually in the editor, but not to insert any kind of newline and/or indentation. If that’s not possible I’d prefer to have very long lines instead of hard-wrapped lines.
For PHP, this works pretty well, but for HTML this is just annoying.
Any help is appreciated.
BTW, version is PhpStorm 3, 111.19.
Carsten
请先登录再写评论。
Hi Carsten,
Regards, Denis
Hi,
thanks a lot – this was the culprit!
Carsten
How do we turn this off in PhpStorm 2018? I can't find setting to turn this off and it is driving me batty.
@Philip Tyrer
"Settings/Preferences | Editor | Code Style"
It can then also be overridden for specific language (HTML is one of them):
Thank you Andriy. Those are my settings but you made me look under Code Style > HTML and I found that unchecking "Wrap text" does what I need.
@Philip Thank you!!! This has been driving me nuts for a long time. I have a WordPress blog and WP takes the hard wraps literally.