Sublime Forum

Package Path Customization

#1

Hello folks!

New to the forum here, looking for a way to deploy packages for our company to a shared network location, and have sublime pick them up. Is there any kind of environment variable or setting that can specify other package locations? We’d love to start providing sublime to our development team but not if we can’t really support a nice enterprise environment.

Any pther thoughts on how we might implement something like this are welcome too!

Thanks

0 Likes

#2

What is your platform?

0 Likes

#3

mostly linux but we would need to support windows and mac in the foreseeable future as well

0 Likes

#4

What use case are you targetting; are you wanting to supply your own customized packages for installation or are you looking at a way to not have your development machines talking to the open internet? Something else?

You can use a symlink to point a directory inside of the current Packages path at an external location, so that might be one way to go about it. I’ve never tried that from a network share perspective though, so there may be some potential performance wrinkles at startup or something. Also in my (anecdotal) experience, under windows Sublime doesn’t notice when files inside of a junction’d directory are modified, which is a bit of an inconvenience.

If you’re using Package Control it’s also possible to set up your own package channel for packages. The list of your packages is integrated with the official channel (which you can also remove from the configuration so only your custom packages are visible), allowing people to install packages from your site as they would normally. In that case you would have to serve the files from an intranet (and I believe it needs to be accessible via https for security reasons).

2 Likes

#5

symlink is not a bad idea, but you’re right startup performance might falter a little (I’ll have to do some investigating). I would consider a package channel but it sounds like setting up packages that use private repositories is a challenge if possible at all. The idea here is to reduce setup and support needs, so that new developers can quickly have access to all of the tools, snippets etc… while also allowing people to easily add new ones and have them picked up by the rest of the team.

Really I was hoping that you could just configure a supplementary package directory, but I guess I was too hopeful on that one.

0 Likes

#6

Why not write a script that syncs your standard packages into the users’ local package directory and have it run at startup:

http://sublimetexttips.com/execute-a-command-every-time-sublime-launches/

You could also use it the enforce a standard environment.

0 Likes