If my code reaches the right magin and I reformat code (Ctrl + Alt + L), PHPStorm automatically wrap code. How do I stop this (reformatting code with wrapping)? I'm working with php and other languages for web development
In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. Switch to the Formatter tab and enable the Turn formatter on/off with markers in code comments option.
Right-click the left gutter and from the context menu, either select or clear the Soft-Wrap Current Editor option.
Reformat and rearrange code AppCode lets you reformat your code according to the requirements you've specified in your current code style scheme. You can reformat a part of code, the whole file, group of files, a directory, and a module. You can also exclude part of code or some files from the reformatting.
See under Preferences > Code Style, where you can tweak by language.
Also check the settings under Preferences > Code Style > General (affects all languages):
I found this worked for me for the auto format wrapping issue:
Preferences > Editor > Code Style > HTML
From there, change the Wrap Attributes dropdown select to Do not wrap and I also unchecked the box Wrap Text. See below:
Edit: I should add that I have the PhpStorm version 2018.2
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