No new line "surround with …" or Emmet abbreviation
I don't want PhpStorm to insert a new line when I expand an Emmet abbreviation. For example this line where I want to insert a link:
<p>I want the link element to stay in this line a|</p>
<p>I want the link element to stay in this line
<a href="|"></a></p>
After expanding it should be
<p>I want the link element to stay in this line <a href=""></a></p>
The same when I surround with Emmet or a tag.
In Editor > Code Style > HTML > Other I have a, img, span etc. as inline elements defined. And those elements are not in the list "Insert new line before".
请先登录再写评论。
can't reproduce. Does it happen in .html or in .php files? Please share a file the issue can be reproduced in and your code style preferences (
~/.PhpStorm2019.3/config/codestyles/<scheme name>.xmlif you are using IDE-level scheme, or.idea\codeStyles\Project.xmlwhen using a project scheme)Sorry, for my late reply and thanks for helping!
It seems to happen only in PHP files. See GIF below for a PHP template file.
There is no folder ~/.PhpStorm*/ in my user folder and there is no folder codeStyles inside the idea folder in my project. There is a folder PhpStorm2019.3 in ~/Library/Application Support/ but again no codeStyles folder there.
PhpStorm 2019.3.3
Build #PS-193.6494.47, built on February 12, 2020
Licensed to xxx
Subscription is active until May 6, 2020
Runtime version: 11.0.5+10-b520.38 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.2
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: String Manipulation, cn.yiiguxing.plugin.translate, com.alayouni.ansiHighlight, com.andrey4623.rainbowcsv, com.github.novotnyr.jwt-intellij-plugin, com.intellij.ideolog, net.seesharpsoft.intellij.plugins.csv, net.vektah.codeglance, tanvd.grazi
works fine for me in .php files as well
>There is no folder ~/.PhpStorm*/ in my user folder and there is no folder codeStyles inside the idea folder in my project. There is a folder PhpStorm2019.3 in ~/Library/Application Support/ but again no codeStyles folder there.
Please share the
~/Library/Preferences/PhpStorm2019.3/config/codestyles/<scheme name>.xmlthenThere is a folder codestyles directly inside the PhpStorm2019.3 folder, but no config folder. I guess this is the file we're looking for.
~/Library/Preferences/PhpStorm2019.3/codestyles/Sebastian Formatting.xml
File from my project: https://www.dropbox.com/s/nvk8kmn6ydxr0sb/testfile.php?dl=1
Codestyle file: https://www.dropbox.com/s/tnt5d28ffma1cl6/Sebastian%20Formatting.xml?dl=1
Please try changing Hard wrap at in Preferences | Editor | Code Style | PHP | Wrapping and Braces to some reasonable value - you have it set to 0 currently
Many thanks! That's it :-) Hadn't though of that particular setting.