Install package control linux

How to Install and Use Sublime Text Editor in Linux

When speaking about text editors and IDE’s there is always a never-ending debate among programmers which text editor/IDE is best. Well, the choice is always personal; I have seen people sticking with single editor/IDE and some people using 2 to 3 editors/IDE’s at a time. It depends on the nature of work and the features editor/IDE provides.

This article is about a popular text editor that is distinguished for its speed, attractive user interface, simple to use, rich community support, and a ton more to say. Yes, that is “Sublime Text”. Initial release in 2008 and written in C++ and Python, Sublime Text is cross-platform and highly customizable. At the time of writing this article, the latest version is 3.2.2.

Sublime Text text is neither open source nor free, you have to purchase a one-time license. But you have an option to use it for evaluation and there is no time limit to purchase the license.

Installing Sublime Editor in Linux Systems

Sublime Text Editor is cross-platform, you can use it in Linux, Windows or Mac systems. To install Sublime Text 3 in different flavors of Linux, refer to the below instructions.

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 completed, you can set Sublime Text Editor as your default text editor by going to preferred Applications from the start menu. I am using Linux Mint 19.3, depending upon your OS flavor you can set the default option.

Set Sublime Editor as Default

You can also start Sublime Text Editor from the terminal by typing:

Install Package Manager for Sublime Editor

Sublime Text by default does not ship with features that make it powerful. Either you want packages for Front End Web Development, Back End Development, Scripting, Configuration Management tools, or Database you got it.

Package related information can be found in 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 pallet. Type “ Install Package Control ” and press ENTER.

Читайте также:  Virtualbox размер экрана linux

Install Package Control for Sublime

Now you can start installing packages, list packages, remove or disable, etc..

Press “ CTRL + SHIFT + P ” → COMMAND PALLET → “ TYPE Package ” → It will display all options you can use for package management.

Sublime Package List

Install Packages in Sublime

To install any package press “ CTRL + SHIFT + P ” → COMMAND PALLET → “ install package ” → “ package Name “.

Install Package for Sublime

Below is the list of packages we will be installing and see how to configure the properties of the packages.

This package gives you more options to handle files and folders. After installing Sublime you can go to “SIDE BAR” → 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 PACKAGESIDEBARENHANCEMENT.

Themes

Sublime gives us the option to change the UI and Syntax color scheme. The color scheme will set the syntax colors for our code while Theme will change the UI look.

I am using “PREDAWN” theme. You can choose whichever you feel best. You can check the available themes from package control/themes.

To install a theme – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGEPREDWAN.

Install Theme in Sublime

File Icon

This package adds pretty icons to your files and folders in the sidebar. There are a few options you can pick from. I am using “A FILE ICON“.

To install File Icon – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGEA FILE ICON.

Install Icons in Sublime

sFTP

SFTP package allows me to sync my projects/code (Folders) in 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 codes to remote servers easily.

To install SFTP – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGESFTP.

To set up the SFTP, choose your project folder which needs to be remotely synced. Inside the folder, the “sftp-config.json” file will be created.

This is an SFTP settings file where details like username, hostname, password, and the 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.

NOTE: “sftp-config.json” is specific to a particular folder. For each remote mapping, a new configuration file will be created.

FOLDERRIGHT CLICKSFTPMAP TO REMOTESFTP-CONFIG.JSON.

sftp Configuration for Sublime

Terminus

Sublime by default does not have terminal integrated. Terminus is a cross-platform terminal for sublime.

To install TerminusCOMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGETERMINUS.

Two ways to start Terminus:

  1. COMMAND PALLET [ CTRL + SHIFT + P ] → TERMINUS: TOGGLE PANEL.
  2. COMMAND PALLET [ CTRL + SHIFT + P ] → TERMINUS KEY BINDINGS → DECLARE SHORTCUT KEY.

Terminus Key BindingTerminus in Sublime

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 PACKAGESYNC SETTINGS.

Sublime Sync Settings

Bracket Highlighter

Bracket Highlighter package matches a variety of brackets and even custom brackets. You can also customize colors, different bracket-style, and highlight mode.

Читайте также:  Сеть предприятия под linux

To install Bracket Highlighter – COMMAND PALLET [ CTRL + SHIFT + P ] → INSTALL PACKAGEBRACKETHIGHLIGHTER.

Install Bracket Highlighter for Sublime

Other than the 6 packages mentioned in the above section there are 100’s of packages available. Explore different packages from Package Control and try it whichever satisfies 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: KEY BINDINGS. There are two sections in keybinding, one is default keybinding and the other is user-defined keybinding where you can place custom keybindings. You can get the list of shortcuts and its function from “DEFAULT KEYMAP FILE”.

Sublime Shortcuts

In this article, we have seen how to install sublime text 3 in Linux. How to install packages and a few important packages and shortcuts. This article is not created in relation to configuring sublime text for any specific programming language. In the next article, we will see how to setup sublime text 3 for python development.

Источник

How to Install Sublime Text 4 in Linux

If you’re not a terminal lover, you might not like using the popular command-line text editors Vi or Vim. Speaking of graphical-based, Sublime Text is one of the most preferred cross-platform proprietary-based text and source code editors, that natively supports various programming and markup languages.

Sublime Text 4 is the most recent version that supports important features like GPU rendering for fluid UI, tab multi-select, ARM64 Linux support, and rewritten auto-complete engine for smart completions.

In this article, I’ll show you how to install Sublime Text 4 in a Linux-based operating system using the following various methods:

Install Sublime Text 4 in Linux via DEB/RPM File

Let’s start with the most preferred and official way of installing Sublime Text on Linux distributions. Sublime Text provides DEB installer files for Debian-based Linux distros like Ubuntu/Linux Mint and RPM files for Red Hat-based distributions like Fedora, CentOS Stream, Rocky & AlmaLinux.

You can visit the official Sublime Text download page and directly get the installer DEB or RPM file.

Now, go to the directory where you downloaded the file, right-click on the file, and choose the “Open with other application” option, which will prompt a dialog to open DEB/RPM file with the respective default Software Installer.

Install Sublime Text DEB File

Alternatively, you can also use command line tools like DPKG for DEB and RPM for RPM installer files by executing the below commands:

$ sudo dpkg -i .deb [Debian-based Ubuntu, Mint] $ sudo rpm -i .deb [Red Hat-based Fedora, Rocky Linux]

Install Sublime Text 4 in Linux via Tarball

On the same download page, apart from DEB/RPM, you might have also noticed the tar file also available. So, we can also use the bundled tar file to run Sublime text on Linux.

Download the tar file, decompress it manually and run it by running the commands in the terminal:

$ tar xf sublime_text_build_4143_x64.tar.xz $ cd sublime_text $ ./sublime_text

Run Sublime Text in Linux

As you can see, the command will launch the Sublime Text 4 application in Linux.

Читайте также:  Контроль устройств astra linux

Install Sublime Text 4 In Linux Using Repository

Instead of downloading the official DEB/RPM package or tar file, you can also use the respective package manager like APT for Debian-based and DNF for RHEL-based distros to install the Sublime Text 4 editor.

Install Sublime Text 4 in Debian Distros

$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null $ 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 apt-transport-https $ sudo apt-get install sublime-text

Install Sublime Text 4 in RHEL Ditros

$ 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

Install Sublime Text 4 in Linux Using Snap

Snap is a universal package manager that can be used on all major Linux distributions, including Ubuntu, Linux Mint, Debian, and Fedora. Surprisingly, Snap is pre-installed on some Linux distributions like Ubuntu, Manjaro, KDE Neon, and Zorin OS.

So, if you already have Snap on your system, run a single command to install Sublime Text 4:

$ sudo snap install sublime-text --classic

In case, you don’t have Snap, you still can install Snap by following the official snap documentation.

Install Sublime Text 4 in Linux Using Flatpak

Similar to Snap, Flatpak is also yet another popular universal package manager available for almost all Linux distributions. But unfortunately, as I’m writing this article, Sublime Text 4 is not available as a Flatpak package on the Flathub repository.

Sublime Text 3 is available as Flatpak, which you can install by running the command:

$ flatpak install flathub com.sublimetext.three

How To Use Sublime Text 4 on Linux

Let’s start with a very important feature of Sublime Text, which helps it to bring additional functionality to your needs using plugins.

Instead of manually installing plugins, package control is a package manager for Sublime Text that lets you find, install, and update packages within the application.

So, let’s first install Package Control by opening the Tools menu and selecting Install Package Control.

Install Package Control in Sublime Text

Now, you can install a plugin by first opening Command Palette using the shortcut CTRL + SHIFT + P or going to Tools -> Command Palette menu.

Command Palette in Sublime Text

Then, search for “package control” in Command Palette, which will list all available Package Control options to carry operation.

Search Package Control in Sublime Text

One such option is Install Package, which you can select that will pop up another window containing a list of all available packages. Here you can search for your required package as I did for the “Git” file management tool. Select the result and it will install the plugin in a few seconds in the background.

Install Git in Sublime Text

Once installed, go to Preferences -> Package Settings – which will display all installed packages in Sublime Text.

List Installed Packages in Sublime Text

Now, you can open the settings file of the Git package to edit and make it work as per your need.

Edit Git in Sublime Text

Alternatively, you can also use the Package Control option “List Package” in Command Palette to display all installed packages.

Package Control List Packages

At last, you’ve learned how to install Sublime Text 4 using not just the installer package file but also using a package manager like Snap. After installing, you also get to know how to use Sublime Text and make the most out of its feature like Package Control.

Источник

Оцените статью
Adblock
detector