Home Download Buy Blog Forum Support

User settings and packages organization

User settings and packages organization

Postby jburnett on Mon Aug 29, 2011 1:56 am

I'm trying to get my head around how Sublime wants user settings and packages to be organized, especially in the face of sharing those things amongst machines. Currently in the user's Sublime dir we have this:

-Sublime Text 2
--Installed Packages
--Packages
---ActionScript
---(etc)
---User
--Pristine Packages
--Settings

A few questions on this layout, mainly driven by what I've been running into while keeping my Packages dir in version control:

-What is "Installed Packages" is for?

-"Packages" holds both Sublime-shipped packages and user-installed packages. To keep this distinction more clear, could the Sublime-shipped packages live in a separate tree? Every time a new version of Sublime comes out and it updates the Sublime-shipped packages, I have to commit those changes to my config.

-Could Pristine Packages just live under the main Sublime installation dir, to avoid duplication?

I think what I'm hoping for is the ability to just store my customizations in a more sandboxed area that isn't shared with Sublime's default config. I think :). Maybe something like the following tree, where there's a "User Packages" tree that mirrors the functionality of a sibling "Sublime Packages" tree:

-Sublime Text 2
--Sublime Packages <- Things that Sublime controls
---ActionScript
---Default
---(etc)
--User Packages <- Things the user controls
---Default <- The equivalent of the current Packages/User
---RandomPackage
---(etc)
--Settings

Thoughts?

John
jburnett
 
Posts: 89
Joined: Wed Jul 27, 2011 9:23 pm

Re: User settings and packages organization

Postby ashb on Mon Aug 29, 2011 12:04 pm

Something like this would suit me too - with this I could just symlink the User Packages folder into my config git checkout and have my settings and any other packages i've installed shared between machines.

+1

-ash
ashb
 
Posts: 8
Joined: Thu Jun 02, 2011 9:29 pm

Re: User settings and packages organization

Postby wbond on Mon Aug 29, 2011 1:17 pm

I've spent a decent amount of time working with these directories and here is what I've found. I may still be missing some of the subtleties of these, but I'd had some fun experiences! I think this info will at least indirectly answer most of your questions.

  • Packages: all of the running packages for the editor, both user-supplied and Sublime-supplied. The folders are loaded in alphabetical order, except the User directory get loaded last.
  • Packages/User: The last package folder to be loaded, with settings and keymaps from here overriding files of the same name from other folders.
  • Pristine Packages: the original source code for packages, used to create backups when upgrading. If a package is present here and not in Installed Packages or the Sublime Text 2/Pristine Packages directory, the package will be outright deleted from Packages without warning or backup.
  • Installed Packages: a place to download .sublime-package files to - ST2 will automatically install these upon next start. Any packages installed here are duplicated in Pristine Packages.
  • Backup: whenever PackageSetup.py thinks that a file from Pristine Packages or Installed Packages is newer than the files in Packages, it will back up the old files to a timestamped folder in there before overwriting them.

If you don't want to backup Sublime-supplied packages, you can get a list of those from Sublime Text 2/Pristine Packages, although you would probably need to write some script to do this.
wbond
 
Posts: 527
Joined: Mon Feb 28, 2011 5:33 am


Return to General Discussion

Who is online

Users browsing this forum: prmaple, Yahoo [Bot] and 32 guests