SublimeText / TrailingSpaces

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

Settings Being Overwritten? #65

Open matthewwithanm opened 10 years ago

matthewwithanm commented 10 years ago

I'm not sure if this is an issue with TrailingSpaces or ST3, but it's only happened with this bundle so I'm posting here.

For some reason, my settings keep being overwritten. I edit my user-specific package settings to look like this:

{
    "trailing_spaces_highlight_color": "trailingspaces.invalid"
}

Then a few days later I notice that it's not highlighting anymore, so I open the file and see this:

{
    "trailing_spaces_highlight_color": ""
}

This has happened several times now, and only for TrailingSpaces. Any idea what could be up?

halhenke commented 10 years ago

Same - thing happening for me - reverted to

{
    "trailing_spaces_highlight_color": "invalid"
}

though...

aWakeParks commented 10 years ago

I have the excatly same issue as matthewwithanm.

It worked for several days and now it stopped because every time I toggle between hightlighting enabled and disabled it replaces my settings with "trailing_spaces_highlight_color": "" . I am running Sublime as portable installation on W7/32bit.

Moreover it says "Highlighting of trailing spaces disabled" in the notification bar at the bottom of ST3. Settings are that it is enabled. This is what occurs in the console, when i update the Settings-user.

Traceback (most recent call last): File "C:\Daten\Sublime Text 3\sublime_plugin.py", line 303, in on_activated callback.on_activated(v) File "trailing_spaces in C:\Daten\Sublime Text 3\Data\Installed Packages\TrailingSpaces.sublime-package", line 395, in on_activated File "trailing_spaces in C:\Daten\Sublime Text 3\Data\Installed Packages\TrailingSpaces.sublime-package", line 416, in freeze_last_version File "X/codecs.py", line 884, in open FileNotFoundError: [Errno 2] No such file or directory: 'C:\Daten\Sublime Text 3\Data\Packages\TrailingSpaces\trailing_spaces.sublime-settings' reloading Packages/User/trailing_spaces.sublime-settings Reloading /C/Daten/Sublime Text 3/Data/Packages/User/trailing_spaces.sublime-settings

I installed it manually and now the errors are gone, but it still overwrites the highlighting color setting.

tablatronix commented 10 years ago

As previous,

I also noticed when toggling highlight via command panel modifies the user prefs file, removes all comments, removes pattern and removes the highlight scope.

Very annoying.

Edit (looks like the comment removal part is an ST bug)

jrdmcgr commented 8 years ago

I ran into this same problem. I was getting this stacktrace in the console.

Traceback (most recent call last):
  File "/Users/jmcguire/Desktop/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 304, in on_activated
    callback.on_activated(v)
  File "trailing_spaces in /Users/jmcguire/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package", line 419, in on_activated
  File "trailing_spaces in /Users/jmcguire/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package", line 440, in freeze_last_version
  File "./codecs.py", line 885, in open
FileNotFoundError: [Errno 2] No such file or directory: '/Users/jmcguire/Library/Application Support/Sublime Text 3/Packages/TrailingSpaces/trailing_spaces.sublime-settings'

I used the command PackageControl: Advanced Install Package and types in the package name TrailingSpaces and it fixed the problem with my settings.

junkystu commented 7 years ago

Same issue here on Linux. I update my user settings file to set "trailing_spaces_highlight_color": "invalid" and after saving it, if I edit a file and add some trailing space, the setting is lost and changes back to "trailing_spaces_highlight_color": ""

FileNotFoundError: [Errno 2] No such file or directory: '/home/junkystu/.config/sublime-text-3/Packages/TrailingSpaces/trailing_spaces.sublime-settings'
reloading settings Packages/User/trailing_spaces.sublime-settings
reloading /home/junkystu/.config/sublime-text-3/Packages/User/trailing_spaces.sublime-settings
reloading settings Packages/User/trailing_spaces.sublime-settings
mike-czarnota commented 7 years ago

I'm working on ST3 build 3126. After updating I'm facing the same issue.

theluk commented 7 years ago

this is driving me nuts...