Sublime Forum

Specify Path to User Settings File?

#1

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:

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

Many thanks for any advice!

0 Likes

#2

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

0 Likes

#3

Or on other platforms, just a symbolic link should do it.

0 Likes

#4

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?

0 Likes

#5

howtogeek.com/howto/windows- … ows-vista/

You need admin rights, apparently.

0 Likes

#6

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?

0 Likes

#7

[quote=“alecrust”]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?[/quote]

If you are having trouble just download the portable and put the entire thing on dropbox - it’s only a 30 megs.

0 Likes

#8

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.

0 Likes

#9

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:

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

0 Likes