You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have trim_trailing_white_space_on_save = true in my user settings. This means that every time autosave triggers, if I had just typed a space, it gets removed.
It would be nice if autosave somehow didn't do that.
The text was updated successfully, but these errors were encountered:
Yeah, I can see that might be annoying. Although what we really need is just to not trim the current line; I would like to trim other lines that I am done working on. Otherwise the auto-saved version would be too different from the "ctrl+s" manually saved file. Other editors (e.g. Komodo Edit) has an option to not trim the current line when trimming trailing white spaces.
As a short term solution, you can increase the auto-save delay, but I can see that's not really an optimal solution. A better solution might be to have auto-save manually trim the current view, but exclude the current line. AFAIK, it is not possible to alter the behaviour of Sublime Text when saving, i.e. if you have trim_trailing_white_space_on_save enabled, then sublime text will trim trailing white spaces, just like when you manually save with ctrl+s. And there is nothing we can do from the plugin side to change that. Other than, perhaps, toggling trim_trailing_white_space_on_save off before saving, and on again after saving.
This does seem a bit like another example where it would be nice to customize how the API save command is invoked. We have a similar case where we don't want Sublime Text to hide word completions when saving (PR #27). In other words, it would be nice to be able to invoke save with something like: view.run_command("save", {"trim_trailing_white_spaces": False, "hide_autocomplete_popup": False})) -- where the second argument is a dict to customize the behaviour of the save command, in this case not hiding autocomplete popups and not trimming trailing white spaces.
I have
trim_trailing_white_space_on_save = true
in my user settings. This means that every time autosave triggers, if I had just typed a space, it gets removed.It would be nice if autosave somehow didn't do that.
The text was updated successfully, but these errors were encountered: