Table of Contents
This tip is about the how to Install and Use Sublime Text Editor in Linux. So read this free guide, How to Install and Use Sublime Text Editor in Linux step by step. If you have query related to same article you may contact us.
How to Install and Use Sublime Text Editor in Linux – Guide
Sublime Text is a cross-platform proprietary text editor available for Linux, Windows and macOS, used for “code, markup and prose”. It has often been called the best code editor for a long time. Sublime Text is facing stiff competition due to new modern code editors like Atom and Visual Studio Code. Despite this, Sublime Text still has a decent user base on Linux.
Installing Sublime Editor on Linux Systems
Sublime Text Editor is cross-platform, you can use it on Linux, Windows or Mac systems. To install Sublime Text 3 on different versions of Linux, see the instructions below.
Install Sublime on Debian/Ubuntu
$ wget -qO – https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add –$ sudo apt-get install apt-transport-https$ echo “deb https://download.sublimetext.com/apt/stable/” | sudo tee /etc/apt/sources.list.d/sublime-text.list$ sudo apt-get update$ sudo apt-get install sublime-text
Install Sublime on CentOS/RHEL
$ sudo rpm -v –import https://download.sublimetext.com/sublimehq-rpm-pub.gpg$ sudo yum-config-manager –add-repo https://download.sublimetext.com/rpm/stable/x86_64 /sublime-text.repo$ sudo yum install sublime-text
Install Sublime on Fedora
$ sudo rpm -v –import https://download.sublimetext.com/sublimehq-rpm-pub.gpg$ sudo dnf config-manager –add-repo https://download.sublimetext.com/rpm/stable/x86_64/ sublime-text.repo$ sudo dnf install sublime-text
Once the installation is complete, you can set Sublime Text Editor as your default text editor by going to Preferred Applications from the Start menu. I’m using Linux Mint 19.3, depending on your OS type you can set the default option. You can also launch Sublime Text Editor in the terminal by typing:
$ subl
Install Package Manager for Sublime Editor
Sublime Text by default is not provided with features that make you powerful. Or you want packages for frontend web development, backend development, scripts, configuration or database management tools.
Package related information can be found in the package control. To install packages we have to first install “PACKAGE CONTROL” which takes care of package management (install, enable, remove, disable, list, etc.) for sublime. Press “CTRL + SHIFT + P”. It will open the command palette. Type “Install Package Control” and press ENTER.
Now you can start installing packages, listing packages, removing or disabling, etc. Press “CTRL+SHIFT+P” → COMMAND PALLET → “TYPE Package” → It will display all options you can use for package management.
Install packages in Sublime
To install any package press “CTRL + SHIFT + P” → COMMAND PALLET → “install package” → “Package name”. Below is the list of packages that we are going to install and see how to configure package properties.
Sidebar enhancement
This package gives you more options for handling files and folders. After installing Sublime, you can go to “SIDEBAR” → RIGHT CLICK → OPTIONS WILL BE DISPLAYED. Then you can install “SideBarEnhancements” and see the difference. To install SideBar Enhancements – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → SIDE REINFORCEMENT.
themes
Sublime gives us the option to change the UI color scheme and syntax. The color scheme will set the syntax colors for our code, while the theme will change the appearance of the UI. I’m using the “PREDAWN” theme. You can choose what you think is best. You can check available themes in package control/themes. To install a theme – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → PREDWAN.
file icon
This pack adds beautiful icons to your files and folders in the sidebar. There are a few options you can choose from. I’m using “A FILE ICON”. To install the file icon – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → A FILE ICON.
sFTP
The SFTP package allows me to sync my projects/code (folders) on remote servers. This is very useful in many cases like when your production servers are running in the cloud and your development machine is local where you can sync your code with remote servers easily.
To install SFTP – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → SFTP. Per up SFTP, choose the folder of your project that needs to be synced remotely. Inside the folder, the file “sftp-config.json” will be created.
This is an SFTP settings file where details like username, hostname, password and remote path to be declared. You can also enable options like “upload_on_save”, which will sync your changes immediately when you save your local copy.
FOLDER → RIGHT CLICK → SFTP → MAP TO REMOTE → SFTP-CONFIG.JSON.
Terminal
Sublime by default does not have an integrated terminal. Terminus is a cross-platform terminal for sublime. To install Terminus – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → TERMINUS.
Two ways to start Terminus:
CONTROL PALLET [ CTRL + SHIFT + P ] → TERMINUS: TOGGLE PANEL. CONTROL PALLET [ CTRL + SHIFT + P ] → END KEY LINKS → DECLARE SHORTCUT KEY.
Sync Settings
This package allows you to sync your packages and settings across multiple devices. It uses Github-Gist, providing a reliable and secure way to store your backups. To install SYNC settings – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → SYNC SETTINGS.
square bracket marker
The Bracket Highlighter package matches a variety of brackets and even custom brackets. You can also customize colors, different bracket styles and highlighting mode. To install Bracket Highlighter – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGE → BRACKETHIGHLIGHTER.
In addition to the 6 packages mentioned in the above section, there are hundreds of packages available. Explore different Package Control packages and try what suits your needs.
sublime shortcuts
Sublime shortcuts are customizable and you can port the shortcuts if you are trying to switch to other editors like VScode or Atom. To customize your keyboard shortcuts, COMMAND PALLET [ CTRL + SHIFT + P ] → PREFERENCES: MAIN LINKS. There are two sections on the key combination, one is the default key combination and the other is the user defined key combination, where you can put custom key combinations. You can get the shortcut list and its function from “DEFAULT KEYMAP FILE”.
Final note
I hope you like the guide How to Install and Use Sublime Text Editor in Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.