Php Storm with "Strip trailing spaces on Save" set to "All" ignores line with cursor

StackOverflow https://stackoverflow.com/questions/19660542

  •  01-07-2022
  •  | 
  •  

Вопрос

Having 2 lines with trailing spaces and cursor at the end of the 2nd one, on save action only trailing spaces from 1st line will be striped.

I mean, if I have this:

1st_line[space]
2nd_line[space][cursor]

after save action I will have

1st_line
2nd_line[space][cursor]

Is it possible to also strip the line with cursor?

(It can be a philosophical question - Is space in the 2nd line really trailing or not? Though there is cursor behind it)

Это было полезно?

Решение

You can vote of this feature request:

Другие советы

Disable (uncheck) the option "Always keep trailing spaces on caret line" under Settings|Editor|General|Other|Strip trailing spaces on Save.

Taken from the issue-link @CrazyCoder provided in his answer. It is included since PHP Storm version 2016.3.2.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top