Sublime Forum

Updating Sublime and Keeping your customizations intact

#1

Ok we’ve seen a lot of activity lately with sublime text updates (and thats good!)
Anyways, I have a lot of snippets and macros and whatnot, so when I update I would like to have the new changes but still keep all my customizations intact.

What I do right now is backup sublime text (in %appdata%) and then move over everything manually, but is a tedious process.
I was thinking maybe just create a package for my own customizations and that way anytime I create something new just update the package and that way with updates I still have all my stuff + the new things from the updates. Also it makes it easy to share stuff with the community.

Any advice on how to accomplish this Jon? or anybody else?

How do I create a sublime-package?

Tips are welcome, I think this might be a good candidate for FAQs too :smile:

P.S: I am aware that sublime is portable (viewtopic.php?f=3&t=97) but that still doesn’t solve what I mentioned above.

EDIT: Found the answer! :smiley:

[quote] When you install Sublime Text, a bunch of *.sublime-package files get added to C:\Program Files\Sublime Text\Pristine Packages. Each of these is just a simple zip file.

When you run Sublime, it compares all these packages with the ones currently in:
C:\Documents and Settings<username>\Application Data\Sublime Text\Pristine Packages

Each new or modified package gets installed, also to the Application Data directory, but under the Packages folder. The basic process of upgrading/installing a package is to compare all the files in the old vs. new ones, and replace the on disk versions. Files in the older package but not the newer are removed.

There’s also no easy way to create new packages yet, other than creating a new directory under Application Data\Sublime Text\Packages, and zipping it up.
[/quote]

That explains a lot now :smile:

0 Likes

#2

i use svn so i check in my customization each time, and sync between the computers i use.

but i think this issue must be addressed in a better way. because, if sublime depends on user customization/plugins, it should allow the user to easily back it up, change it, and sync it.

my thoughts:

  • the user should have a package with his changes. and his installed plugins/packages. i would suggest also not to hide it under %appdata% but to put it on the windows equivalent to /home/user_name on unix (like c:\users\user_name\sublime on vista/7).

  • it should be done in such way, a user can zip it and send it to someone else which can unzip it and use it right away.

  • it should not contain all the sublime defaults or packages default - just the changes needed. this to keep it minimal in size.

  • if a pro-user wants to hack sublime defaults or packages defaults, be my guest and go to %appdata% and do what ever you want (as it is now)

vim.

0 Likes

#3

A few comments:

  • As much as possible, try to place any additional files within a separate package, such as the User/ package. This will protect them from getting overriden.
  • Customising the key bindings can be done by placing a new Default.sublime-keymap file within this package, and adding your key bindings there.

I agree this isn’t a great situation. For one, customisation to files like Main.sublime-menu can’t be done in a separate file, so they always run the risk of being overwritten.

I’d like to see a proper solution to these issues, but I’ve yet to sit down and make a plan how. One option is to make a GUI for all the customisation, which provides an easy way to record the customisations, but I’m not particularily keen on this: I personally prefer editing configuration files than spending all day clicking on buttons. My current half baked plan is to do intelligent merging of things like options files, where it’s fairly easy to merge option by option. It wouldn’t help with more complex files like key bindings and menus though.

0 Likes