Phpstorm make indent even if "Keep indents on empty lines" is unchecked

In settings in left window it works fine, but in editor every new line have indent. Our eslint rules forbid indents on empty lines and I must every time delete them by hands.

3 comments
Comment actions Permalink

You have to reformat the code in order to have "Don't keep indents on empty lines" applied.
If new lines don't have indent, you'll have to indent them manually every time. Is that your goal?

0
Comment actions Permalink

I have reformatted code but it doesn't help.




Look at this two screenshots. On first I placed caret to line "initial = -1;" and pressed enter on second I placed caret to line 167 and pressed enter. As you can see in first case cursor just do what I want, and in second it create extra indent!

0
Comment actions Permalink

> On first I placed caret to line "initial = -1;" and pressed enter

That is expected because code in Preview is being reformatted immediately.

> on second I placed caret to line 167 and pressed enter

But you did not reformat, right? Please do so.
Also, please note that PhpStorm doesn't remove indentation on the line with caret.

0

Please sign in to leave a comment.