Closed kevincon closed 10 years ago
Hi Kevin. Thanks for detailed explanation of issue. It's never happened with me, but I believe autosave should ignore selected blocks. Issue was fixed in the version 1.1.2.
It works great now! Thanks so much for the fast fix!
TLDR: Could you add a setting for the plugin (or change the behavior) so that I can disable formatting text selection when format_on_save is enabled?
I love, love, love this Sublime Text plugin, especially the ability for the plugin to automatically format a file on save, but something that's really annoying is that if I, for example:
Then the plugin tries to only format the selected text, resulting in some really strange text manipulation.
As an example, (with format_on_save enabled), try pasting the following code snippet in a file, highlighting the line
'month': obj.month,
, commenting it out using cmd+/, and then saving using cmd+s:For me, this turns into:
Of course, if I just don't have the text selected when I save, then there's no problem. But for those times that I forget, this behavior is super annoying, because I have to undo several times. Sometimes the plugin even fights back, so I have to continuously hit undo and save to beat the plugin back from screwing up my file.
So could you add a setting for the plugin (or change the behavior) so that I can disable formatting text selection when format_on_save is enabled?
Or can you help me configure the plugin as it is right now somehow to achieve this behavior?
Thanks again for your plugin!