Sublime Text - Sublime Linter

Linting is the process of flagging suspicious constructs and likely to be bugs in any programming language.

Sublime Linter is the package of Sublime Text that helps you to perform linting in Sublime. It helps in creating files in different modes for the manipulation of code base. It is not an in built package and you need to install it manually.

You can install any package control in Sublime Text editor using the shortcut key combination Ctrl+Shift+P, and selecting the Package Control: Install Package option.

Install Linter Package

Select the associated package to install in Sublime Text editor. To install Sublime Linter, you need to select the option of SublimeLinter plugin.

Select the Associated Package to Install

On successful installation, your screen will look as shown below −

Sublime Linter Successful Installation

Modes of Sublime Linter

Sublime Linter runs in four different modes as mentioned below −

Background Mode

When the Sublime Linter key is set to true, linting is performed in the background constantly each time the file is modified.

Load-Save Mode

When the Sublime Linter key is set to , linting load savewill be performed when a file is loaded from the repository.

Save-Only Mode

When the Sublime Linter key is set to save only mode, linting is performed while saving the particular file in working repository.

On Demand Mode

In the on-demand mode, the Sublime Linter will be set to true, using the shortcut Ctrl+Alt+L, which sets up the linter to detect bugs, if any present in the code.