-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trim trailing whitespaces on line with cursor when explicitly saving #466
Comments
It works but not on the line the cursor is on because in that case we do not know if you want to continue typing after the whitespace. |
@bpasero so shouldn't the editor have one more option to define that? |
@thegiantbeast we cannot really offer such an option because when auto save is enabled, the save can kick in anytime (currently 1 second after making a change) and you would not be able to type whitespace after the end of a line and continue typing. |
That doesn't sound complex, as long as you differentiate a save from auto save (where the white spaces are not trimmed) and when the user actually saves a file, no? It's because it's really annoying that I have to remember to delete the spaces in the line that I'm in. |
@alexandrudima fyi |
@bpasero 👍 |
👍 This is great! Thank you! |
❤️ |
I have this set in my settings.json:
But after saving a file containing some trailing whitespace, it doesn't get trimmed:
The text was updated successfully, but these errors were encountered: