Sublime Forum

Importing config from Windows to Linux

#1

I have been using a portable version of sublime on Windows.

I now have an installed version on Linux. What do I need to copy over to have it configured the same.

I have done LOTS of changes.

Is there a way I can copy over my settings, as well as my installed plugins?

0 Likes

#2

You need to copy the User folder to your new installation.

That’s it.

All your plugin are listed in the Package Control.sublime-settings. So, it’s going to download every plugin listed here (you shouldn’t have to worry about it, it has been automatically updated). If you’ve tweak some of them, you’ll need to copy them one by one.

EDIT: you’ll need to install Package Control.

0 Likes

#3

But you have to redo key bindings and other platform specific prefs, no?

0 Likes

#4

Yes, for the key bindings, you have to rename the Default (Windows).sublime-keymap into Default (Linux).sublime-keymap. But, only mac causes trouble with the super key. There shouldn’t be any content you should have to change I think.

What other specific prefs do you have? (for me, it’s only the .sublime-keymap)

Matt

0 Likes

#5

Yes, the Mac key junk is what I ran into, and also there is this in the preferences file, but I can’t find the platform specific pref file on my Mac, at least in the User folder:

// Note that the font_face and font_size are overridden in the platform
// specific settings file, for example, "Preferences (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
0 Likes

#6

TL;DR: The files aren’t there because Sublime won’t load them anyway. If you want to see what the defaults are for other platforms you can use PackageResourceViewer to view the Default package, but you can’t have platform specific settings in your User package.

More verbosely:

The general rules Sublime uses for loading preference files is:

  1. FIles with the same name in multiple packages are merged together as one file, in package load order
  2. The order that packages are loaded is alphabetical by name, except that the Default package is always loaded first and the User package is always loaded last.
  3. If a settings file name contains a platform designation, such as (Linux), (Windows) or (OSX), that settings file is only loaded on the platform named
  4. Sublime will not load a platform specific settings file from the User package

With that out of the way and to answer your question more specifically, the Default package (which ships with sublime) contains the following files:

  • Preferences.sublime-settings
  • Preferences (Windows).sublime-settings
  • Preferences (Linux).sublime-settings
  • Preferences (OSX).sublime-settings

The first one is the file that you see in the left pane when you use Preferences > Settings from the menu. It specifies the default values for all (documented) settings. The other three files contain only overrides for settings specific to an operating system. For example the font_face setting, which defaults to Consolas on Windows, Monospace on Linux and Menlo-Regular on OSX which are presumably the most common font available on each system.

The reason you can’t find such files in your User folder is due to rule #4 above: Sublime won’t load files that are platform specific from the User folder, so it doesn’t create them there.

If you truly want to have different platform specific settings per platform it gets tricky; if you put them in your User package, they won’t load, and if you put them in some other package you can’t guarantee that the package load order will make sure that the setting doesn’t get overridden somewhere along the line.

2 Likes

#7

Sublime text did not install the missing packages and my theme is corrupt…

0 Likes

#8

Have you installed package control?

Which theme are you using?

0 Likes

#9

Theme is spacegray. But I tried this all over again.

I copy the user folder, but my installed packages are not downloaded.

The User folder of my portable windows install does not contain the installed packages folder, but is rather a sibling of that folder.

So how do i get the install packages moved over?

EDIT:

Ok so package control is the plugin that will automatically update your installed packages.

The default install of sublime does not have package control installed. So once I installed package control, it went and got all my packages for me. Cool stuff.

1 Like