Description
When using autosave-onchange and whitespace plugin with "Ensure Single Trailing Whitespace", one's ability to edit the file at it's end is reduced, since autosave-onchange saves the file every 500ms, and whitespace automatically removes the whitespace at the end.
I love to create a few new lines to start a new paragraph before thinking of what exactly should I be writing right now, and then autosave-onchange kicks in and saves the file. Whitespace plugin, triggered by autosave-onchange, will remove all of the newly created whitespace (although it is useful in this case). It is unreasonably annoying - requires me to always add a non-empty line, so that this behaviour wouldn't distract me.
I can also see how this functionality may require more work than the amount of work it takes to fix it in the first place. So in such scenario it may be nice to hear the opinions of the official maintainers of the plugin.
Also not exactly sure if that's a whitespace
or an autosave-onchange
issue.
Steps to Reproduce
- Set up whitespace plugin with "Ensure Single Trailing Whitespace"
- Set up autosave-onchange plugin (no additional settings needed).
- Create a new file and save it somewhere on the disk (so that autosave-onchange would start working).
- Press enter a few times
- Wait a few moments.
- autosave-onchange will save the file and whitespace plugin will remove the trailing spaces you had just created, moving the caret to the beginning of the file.
Expected behavior:
I expect the whitespace to be automatically removed when I am not directly editing the file (e.g. when autosave-onchange runs after I had removed the caret from the end of file).
Actual behavior:
Whitespace plugin runs immediately and removes the useful newlines.
Reproduces how often:
100%.
Versions
Atom : 1.31.2
Electron: 2.0.7
Chrome : 61.0.3163.100
Node : 8.9.3