How to remove trailing spaces in an imported file?rt

Hello!

PhpStorm removes trailing spaces automatically on save. (I even don't know, if I can disable this behavior.) But now I have some files, that I added to the project. They have trailing spaces, but when I edit and save them the IDE doesn't touch the trailing spaces. So I can change&save the files so many times I want and the trailing spaces are still there. Is it a bug? Or is it a feature like a special behavior for imported files? Anyway, how to remove trailing spaces in imported files?

Thx

0
1 comment

>(I even don't know, if I can disable this behavior.)

Settings/Preferences | Editor | General | Strip trailing space on Save

NOTE: If you have .editorconfig file in your project, such option can also be controlled via that file (which has priority over corresponding IDE setting). This file can provide more granular control over what files are affected by those settings.

1

Please sign in to leave a comment.