Sublime Text Logo

Sublime Text

Sublime Text is a proprietary cross-platform source code editor with a Python application programming interface (API). It natively supports many programming languages and markup languages, and functions can be added by users with plugins, typically community-built and maintained under free-software licenses.

Software Installation

Install the projects PGP key:

$> wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Ensure apt is set up to work with https sources:

$> sudo apt install apt-transport-https

Add the stable software release channel:

$> echo "deb https://download.sublimetext.com/ apt/stable/" | \
        sudo tee /etc/apt/sources.list.d/sublime-text.list

Update apt sources and install Sublime Text:

$> sudo apt update
$> sudo apt install sublime-text

Package Control

Packages are a collection of resource files used by Sublime Text: plugins, syntax highlighting definitions, menus, snippets and more.

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.

To install Package Control in Sublime Text 3 open the Tools menu and select the “Install Package Control …” menu entry.

There is also a simple installation procedure for older versions.

$> cd "$HOME/.config/sublime-text-3/Installed Packages/"
$> wget -O "Package Control.sublime-package"  \
        https://packagecontrol.io/Package%20Control.sublime-package

After that you can access it in the “Preferences” menu as “Package Comtrol”.

To install a package, select “Install a package” which opens a search box, where you can look for the package name.

Using Sublime Text with git

Setup git to use Sublime Text as default editor:

$> git config --global core.editor "subl --new-window --wait"

References