Sublime Text 3 Formatting code

Learn how to make code look neat and organized in Sublime Text 3 with syntax formatting, indentation, and color customization.

Formatting Code with Sublime Text 3

Sublime Text 3 is a powerful code and text editor that makes coding more efficient and enjoyable. It has a wide range of features for formatting code, including syntax highlighting, code completion, and auto indentation. This article will provide an overview of some of the key features for formatting code in Sublime Text 3.

Syntax Highlighting

Syntax highlighting is a feature that highlights different components of code in different colors. This makes it easier to quickly identify and differentiate between different types of code. Sublime Text 3 supports syntax highlighting for a variety of languages, including HTML, CSS, JavaScript, and Python.

// JavaScript example
let x = 1;
if (x === 1) {
    console.log('x equals 1');
} else {
    console.log('x does not equal 1');
}

Code Completion

Code completion is a feature that helps speed up coding by automatically completing code based on what has already been written. Sublime Text 3 offers code completion for a variety of languages, including HTML, CSS, JavaScript, and Python. It also offers suggestions for functions and variables for a given language.

// JavaScript example
let x = 1;
if (x === 1) {
    console.log( /* Code completion will suggest 'x equals 1' here */ );
} else {
    console.log('x does not equal 1');
}

Auto Indentation

Auto indentation is a feature that automatically adds indentation to code. This can help make code more readable and easier to understand. Sublime Text 3 offers auto indentation for a variety of languages, including HTML, CSS, JavaScript, and Python.

// JavaScript example
let x = 1;
if (x === 1) {
    console.log('x equals 1');
} else {
    console.log('x does not equal 1');
}

These are just a few of the key features for formatting code in Sublime Text 3. There are many more features available to make coding more efficient and enjoyable.

Answers (0)