A package is a container for resources.
Packages can be folders under
or zip archives under
Typical resources found in packages include:
Some packages may hold support files
for other packages or core features.
For example, the spell checker
Packages/Language - English.sublime-package
as a data store for English dictionaries.
The Installed Packages Folder¶
You will find this folder
Types of Packages¶
In this guide, we categorize packages for clarity when discussing this topic. Sublime Text doesn’t use this terminology and you don’t need to learn it.
- core packages
- Sublime Text requires these packages
in order to work.
- shipped packages
- Included in every installation,
though technically not required.
They enhance Sublime Text out of the box.
May have been contributed by users or
- user packages
- Installed by the user
to extend Sublime Text’s functionaility.
They are not part of Sublime Text,
and are always contributed by users
or third parties.
- installed packages
Packages stored under
.sublime-packagearchives. A type of user package.
Due to the unfortunate name of this folder, talking about installing packages in Sublime Text becomes a confusing business.
Sometimes, in this guide, by instaling we mean ‘adding a user/third party package to Sublime Text’ (in any form), and sometimes we use the term in its stricter sense of ‘copying a
Note that by third party we mainly refer to users of other editors, such as Textmate, as Sublime Text and Textmate share some types of resource files that can be reused without modification.
Nowadays, regular users rarely need to know how to install packages by hand, as automatic package managers are available.
The de facto package manager for Sublime Text is Package Control.
Packages can be installed in two main ways:
- by copying Sublime Text resources
to a folder under
- by copying a
In this guide,
installed packages sometimes refers strictly
.sublime-package archives residing
<Data>/Installed Packages directory.
<Data>/Installed Packages folder
and restart Sublime Text.
<Data>/Installed Packages folder
doesn’t exist, you can create it.
.zip archives with a custom file extension.
Packages and Magic¶
Sublime Text deals with packages without much hidden magic. There are two notable exceptions: Macros defined in any package automatically appear under Tools | Macros | <Your Package>, and snippets from any package appear under Tools | Snippets | <Your Package>.
However, Sublime Text follows some rules for packages. For instance,
Package/User will never be clobbered during updates to the software.
Merging and Order of Precedence¶
Packages/Default and Packages/User receive special treatment when merging files (e.g. .sublime-keymap and .sublime-settings files). Before merging can take place, the files have to be arranged in some order. To that end, Sublime Text sorts them alphabetically by name, with the exception of the Default and User folders. Files contained in Default will always go to the front of the list, and those in User, to the end.
To temporarily disable packages,
you can add them to the
Sublime Text keeps a copy of all installed packages so it can recreate them as
needed. This means it can reinstall core packages, shipped packages and,
potentially, user packages alike. However, only user packages installed as
sublime-packages are added to its registry of installed packages. Packages
installed in alternative ways will be lost completely if you delete them.
Reverting Sublime Text to Its Default Configuration¶
To revert Sublime Text to its default configuration, delete the data directory
and restart the editor. Keep in mind that the
Installed Packages folder will
be deleted too, so you’ll lose all your installed packages.
Always make sure to back up your data before taking an extreme measure like this one.
Reverting Sublime Text to a fresh state solves many problems that appear to be due to bugs in Sublime Text but are in fact caused by misbehaving plugins.