Sublime Forum

Move %APPDATA%\Sublime Text 3\Packages

#1

I am using Windows 10 Insider Preview and well you know sometimes things go awry. This has happened a few times and I have to reset my Windows 10 installation. Occasionally, I lose all of my programs and have to reconfigure everything.

So I was wondering if I could move the default location of %APPDATA%\Sublime Text 3\Packages to another location. This would prevent the loss of my configuration when MS wipes out the user during the reset. Then on reinstalling Sublime Text 3 I would just have to change the default location.

Is this possible, and how?

Thanks

0 Likes

#2

I don’t think it’s possible to change the path Sublime uses for the appdata, but Portable installations of Sublime use a directory called “Data” inside the Sublime Text application directory, which should work for what you need.

0 Likes

#3
2 Likes

#4

The first word that comes up to my mouth (or hand since I’m typing :smile:):

Backup!

Why don’t you backup? Do you know how to use git and GitHub? If you just save your User folder, you’ll be able to your entire config back.

0 Likes

#5

Good advice. Which is what I am trying to do without too much hassle.

The phrase is “comes to mind”

I am often puzzled that Developers don’t make the process of backing up and restoring your data easier. %APPDATA% is a hidden directory, which implies that MS doesn’t intend the User to be messing with it. That said, considering all the other things I can change in settings I am surprised this isn’t available in Sublime.

MS lets me redirect my Documents folder, which I have on a separate drive but MS doesn’t do the same with %APPDATA%.

Not to mention %APPDATA% is full of shit, I wouldn’t want to back up the whole thing.

0 Likes

#6

ST is following Microsoft guidance and conventions in using the AppData directory for user preferences and the like.

Since plugins and almost everything that configures ST appears in that directory, having an option to change that would introduce an added layer of complexity and a source of confusion for a critical part of the system.

I’m not sure I see the logic of what you’re suggesting though, it’s a big change for a little problem. You could also write a small script that copies the directory into a safe place and copies it back from the safe place.

0 Likes

#7

So imagine that I, like most users, kept my Documents in MS’s preferred location. When Windows crashes and restores the OS they just bomb the C drive and everything in it (actually they are getting a little better). So I lose everything. The way I do it is to point Documents to my D drive. When Windows blows up I just have to redirect Documents again and everything is back to my normal. Simpler than backup and restore, but I understand your concern.

ST documentation says

Settings files are consulted in this order:

Packages/Default/Preferences.sublime-settings
Packages/Default/Preferences ().sublime-settings
Packages/User/Preferences.sublime-settings

Packages//.sublime-settings
Packages/User/.sublime-settings

So if my (theoretical) environment variable %USERSETTINGS% points to my D:\Sublime Text 3\ folder how would that cause confusion?

Anyway, ST doesn’t do it at the moment so I will stick to backing up my settings.

Thanks for your input.

0 Likes

#8

Because it adds the element of the user thinking they set that env var when they didn’t, or something set else it and they didn’t know, or something cleared it, etc. It opens up the possibility of more confusion and make support harder.

0 Likes

#9

Doesn’t seem like a good argument. The confused user in that case would likely never have chosen to change the environment variable in the first place, they would live with the default.

How many Windows users know they can redirect Documents and a few other folders? Not many, those that do had to make an effort to change it and know the ramifications.

0 Likes