Sublime Forum

The update deleted my custom color schemes

#1

On Debian. Like a lot of other people, the ST3 “There is an update available for Sublime Text 3” box was popping up, so I updated via my package manager, not realizing it was ST4, which I was excited about but not ready to start using just yet.

The ST4 installation process apparently deleted my custom color schemes. I had put a lot of time into a couple of light and dark .tmTheme files, tuning them for my monitor, coding style, and color blindness.

I didn’t have extra copies stashed anywhere. SublimeText had never just blown away .tmTheme files before, so I never got around to protecting them.

I ran several different find commands against the entire home directory. They really are gone.

The cherry on top is that there are two directories, ~/.config/sublime-text-3 and ~/.cache/sublime-text-3, and near as I can tell, ST4 is using these directories. It could have just created new sublime-text-4 directories in those locations and left the previous ST3 state intact, but it didn’t.

I’ve been dragging my feet at moving on to some of the more full-featured IDEs that the cool kids are using these days, but ST had never disappointed me before, and it had a painless update process that I trusted, and I had a bunch of time sunk into customizing it.

0 Likes

#2

Is there a chance edited colour schemes in your User folder, I think mine is (coz I use an edited Monokia colour scheme) and when I copied it over to a new laptop, voila. If you’ve got an old copy of the user folder it might be worth a look.

(I’ve just checked I’ve got 1 out of two of my edited colour schemes)

I’m going to do some more backing up, so thank you for the heads up :call_me_hand:

0 Likes

#3

Neither ST3 nor ST4 touches anything in the configuration area when it updates, which is why ST4 will use the configuration area for ST3 if it’s there and won’t create it’s own unless there is no existing configuration.

So with that said, was it only your color schemes that went away and nothing else? No settings files, builds, user defined packages, plugins, just color schemes?

A potential reason for that would be that you modified the color scheme by directly editing a sublime-package file that ships with Sublime or which you installed via Package Control.

When Sublime updates, it does so by replacing itself wholesale, which as noted above never touches the user configuration area but which DOES and WILL blow away the application as a whole, including it’s sublime-package files. Similarly when Package Control updates a package, it does the same.

If either case is what happened here, the fact that it was an update to ST4 is incidental and any update could would do the same thing.

0 Likes

#4

Just having a rummage around the net in relation to your issue

I have never tried this but might this be a start ? Or is this diving down a rabbit hole. I’ve backed up all my editied colour schemes now , so thanks again…

0 Likes

#5

@Lozminda Thank you for trying. I haven’t had any luck with file recoveries in Linux in the past – usually requires a known file header and even then it comes back pretty badly corrupted. I used find ~ -iname '*themename*' to search the entire home directory; if it were still lurking somewhere, that command should’ve found it.

@OdatNurd

Well, it did.

I think this is bad practice for a couple of reasons: it’s confusing (why are my ST4 settings in ~/.config/sublime-text-3 ?), it’s dangerous, and it makes downgrading from ST4 back to ST3 more difficult (or maybe impossible, I dunno). It’s also trivially easy to solve this by copying and renaming the existing folder and then working from the copy.

So far, it looks like that’s the case. A few other packages don’t seem to have survived the upgrade but I think those were unmaintained or incompatible with ST4 and none of them are a great loss. Program state worked fine, it reopened with everything in proper order. My user preferences file seems smaller and I’m pretty sure at least one setting got changed (cursor blinking), but other small customizations are still there.

Good guess but I don’t think that’s the case. These were .tmTheme files; once upon a time you could directly add them to ST in a particular directory (I don’t recall which one now), and then at some point along the way ST3 changed the way that worked and I probably did something I wasn’t supposed to do in order to make it work again.

Previous updates did not.

The only thing I can say for certain at this point is that they were somewhere under ~/.cache/sublime-text-3 or ~/.config/sublime-text-3, that files were definitely removed and changed in both of those (and fair play if it’s ~/.cache, but I don’t think it was), that they are gone and not stashed elsewhere, and that copying these ST3 directories to new ST4 directories and using the new ones during the update process would have saved me a lot of wailing and gnashing of teeth.

0 Likes

#6

How so? ST4 doesn’t change the configuration information, so uninstalling and reinstalling ST3 will go back to the config that was there before.

Package Control may decide that there’s a newer version of a package that support ST4, so if you have the older version it will upgrade. However, when you go back it will notice that you have the newer version and tell you, allowing you to downgrade it (and I believe it does this by default as well).

Just to clarify on this (and potentially other config related points like the color scheme changing), the upgrade doesn’t modify your settings, but it does come with new defaults.

So, if you never added the caret style setting to your user settings, you inherit the new default, which is why it seems like it may have changed. In this area note also that the extra height for the cursor top and bottom is updated slightly by default to make the cursor more visible now.

2 Likes

#7

Just thinking out loud: It would be a good idea to back up one’s preferences too? I mean it’s always a good idea to back up, but sometimes one doesn’t think something needs backing up. I’ll back up my keybindings too…

Not that this helps you @robs

I did find this:

until we deliver an own color scheme, please install the “Phix Dark Color Scheme” over Package Control (recommended theme: “Theme Soda dark”), the default theme “Monokai” works decent as well

from this site

The Phix Dark Color scheme is for ST2 but works for ST3. It is a very muted version of this :

I am not visually impaired, but having (differently) brightly coloured “syntax objects” helps me process information more easily. The Phix Dark Colour seem to be a muted pastel version of mine (which is just an altered monokai)
Naturally (and in fact probably) you no doubt see things in a completely different way to me but just (on the small chance) it might save some work, you’re welcome to mine (let me know) and Phix Dark Colour can be installed from package control. (hopefully the folks at ST haven’t overhauled how the colours are processed)
It took me a couple of months to get the colours how I liked em (after going through all the rainglow colours and not finding a scheme I liked) so I sympathise with your predicament even if I can’t help out directly.

If anyone else likes my tweaks to monokai I’ll post…

0 Likes