sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

Option to preserve whitespace on line with cursor #207

Closed rm-code closed 6 years ago

rm-code commented 6 years ago

I'm not sure if this would violate the editorconfig specifications, but it would be nice to have an option/setting which preserves whitespace on lines where the cursor currently is at.

Take a look at this example: foo 2

When the tab loses focus and the file is saved the whitespace is removed. This is the expected behavior, but at least for me it would be preferable if the whitespace was preserved.

florianb commented 6 years ago

Thank you very much for your suggestion @rm-code, but i fear this is not possible as long as trim_trailing_whitespace is set to true.

If this annoys you, i'd like to refer to the https://github.com/editorconfig/ project, you may start a discussion there, either for implementing a new property or refinement of the current definition of the rule.

I'm going to close this issue since we can't solve it here. 🍪