Home Download Buy Blog Forum Support

Specify Path to User Settings File?

Specify Path to User Settings File?

Postby alecrust on Thu Sep 01, 2011 11:04 pm

Is it possible to specify the path of the user settings file within Sublime Text?

I'd like to point the program to my Base File.sublime-settings file that's sitting in my Dropbox folder, so I can automatically sync settings changes across different machines that I develop on.

The file currently resides at:

Code: Select all
C:\Users\<username>\AppData\Roaming\Sublime Text 2\Packages\User\Base File.sublime-settings

Many thanks for any advice!
alecrust
 
Posts: 4
Joined: Thu Sep 01, 2011 10:54 pm

Re: Specify Path to User Settings File?

Postby guillermooo on Thu Sep 01, 2011 11:09 pm

On Windows 7, you can probably create a symlink in the User folder. (Haven't tried myself, though.)
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Specify Path to User Settings File?

Postby jbrooksuk on Fri Sep 02, 2011 7:41 am

guillermooo wrote:On Windows 7, you can probably create a symlink in the User folder. (Haven't tried myself, though.)

Or on other platforms, just a symbolic link should do it.
jbrooksuk
 
Posts: 782
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Specify Path to User Settings File?

Postby alecrust on Fri Sep 02, 2011 7:57 am

Could you provide more details on how to do this? I don't know what a "symlink" is and my Googleing hasn't helped much.

Am I right in thinking this functionality doesn't come with Sublime Text 2 out of the box?
alecrust
 
Posts: 4
Joined: Thu Sep 01, 2011 10:54 pm

Re: Specify Path to User Settings File?

Postby guillermooo on Fri Sep 02, 2011 8:43 am

guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Specify Path to User Settings File?

Postby alecrust on Fri Sep 02, 2011 12:33 pm

Yes, I came across that article when searching on Google. It didn't give me enough information to be able to achieve this on Sublime though.

Could you explain the basics of this please?
alecrust
 
Posts: 4
Joined: Thu Sep 01, 2011 10:54 pm

Re: Specify Path to User Settings File?

Postby atomi on Fri Sep 02, 2011 2:10 pm

alecrust wrote:Yes, I came across that article when searching on Google. It didn't give me enough information to be able to achieve this on Sublime though.

Could you explain the basics of this please?



If you are having trouble just download the portable and put the entire thing on dropbox - it's only a 30 megs.
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Re: Specify Path to User Settings File?

Postby alecrust on Fri Sep 02, 2011 5:30 pm

That's not really an acceptable solution for me for a few reasons.

If someone can give me even just a rough overview of how to use a symlink to achieve this I'd really appreciate it.
alecrust
 
Posts: 4
Joined: Thu Sep 01, 2011 10:54 pm

Re: Specify Path to User Settings File?

Postby guillermooo on Sat Sep 03, 2011 9:19 am

Apparently, you need to use a directory junction. This feature is scarcely documented and has important drawbacks you need to know (check Wikipedia).

1. Start cmd session as admin
2. Navigate to Packages
3. Move Packages to desired location (same volume, see Wikipedia)
4. mklink /J User x:\path\to\User

This will kind of work, but in my brief testing it trips up Sublime Text file system watcher. (Or maybe it isn't posible to monitor changes for reparse points, I don't know.)

Be sure to remove it carefully if you need to, or you may end up deleting important files. Safest way seems to be like this:

Code: Select all
fsutil.exe reparsepoint delete User


... which funnily enough, will leave an empty User directory behind.

Judging by the obscure documentation on this feature, it looks like somebody doesn't want you to use it.

Tested on Windows 7 Ultimate
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 18 guests