SublimeText / TrailingSpaces

Highlight trailing spaces and delete them in a flash.
MIT License
897 stars 94 forks source link

Isn't working on 3114 #105

Closed MaffooBristol closed 4 years ago

MaffooBristol commented 8 years ago

I'm not sure which upgrade it was that killed it but I think it's the very latest 3114 update on Mac OSX Mavericks. Uninstalled and reinstalled trailingspaces, still doesn't work. Menu item shows up but everything is greyed out and no trailing spaces are highlighted at all.

Thanks

rodorgas commented 8 years ago

Can't get it to work on OS X and on Debian 8, ST3 build 3114.

MaffooBristol commented 8 years ago

@rodorgas Glad to see others share the same issue. I think quite a few plugins have broken in 3114- and I'm not sure whether the issue lies within Sublime or the plugins themselves. I've had to downgrade because of so many incompatibilities, and I keep getting irritating "upgrade" popups, so hopefully it'll be resolved soon!

rodorgas commented 8 years ago

Finally managed to get it working following the steps described here http://stackoverflow.com/a/23051790/1840019

A non-blank string value should be set in trailing_spaces_highlight_color.

Quoting Mike Causer:

  1. Open Preferences > Package Settings > Trailing Spaces > Settings - User
  2. Replace:
    "trailing_spaces_highlight_color": ""
    With:
    "trailing_spaces_highlight_color": "invalid"
  3. Restart Sublime.
  4. Edit > Trailing Spaces > Highlight Regions should work as expected now.

If you restart Sublime, "trailing_spaces_highlight_color" must not be a blank string, otherwise it will stop working again. Repeat the steps above to fix.

As long as Sublime is started with a non-blank string value for trailing_spaces_highlight_color, the toggle highlight regions works.

It looks like the plugin is caching the value in the setting file when Sublime loads. If you make changes to the settings file and toggle highlighting, the original value is restored. Which is why you need to restart Sublime for setting changes to take effect.

rchl commented 4 years ago

Duplicate of #65