I know PhpStorm allows the option to remove spaces at the end of a line.
Is it possible to configure it to remove tabs or spaces on empty lines?
Example: I type the following
if (1 == 1) {
Then I press enter twice, and I continue coding...
if (1 == 1) {
savePlanet();
The empty line in the middle now has spaces, but I want just an empty line.
You have 2 options here:
Settings | Editor | General
, Strip trailing spaces on Save
-
when it's set to All
, all trailing spaces/tabs are removed on
Save, including the ones on empty lines Settings | Editor | Code
Style | <Your language> | Tabs and Indents
, Keep indents on empty
lines
: when disabled, spaces/tabs on empty lines are removed on
code reformattingIf 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