gcollazo / BrowserRefresh-Sublime

This plugin will switch from ST2 and ST3 to Google Chrome, Google Chrome Canary, Safari, Firefox or Opera and reload the active tab
http://gcollazo.github.com/BrowserRefresh-Sublime
565 stars 62 forks source link

Trailing whitespace trim occurs after save #30

Closed TrevorBurnham closed 9 years ago

TrevorBurnham commented 11 years ago

In ST2, if you run the browser_refresh command with "auto_save": true, and you have "trim_trailing_white_space_on_save": true in your preferences, then the following occurs in this order:

  1. The document saves
  2. The browser refreshes
  3. Trailing whitespace is trimmed

Because the trimming occurs after the save, the document is now in an unsaved state. It's a nitpick, but is it possible to modify the plugin so that whitespace trimming occurs before the save, as it does when I hit "Save"?