Sublime Text how to make a selected text

"Learn how to use Sublime Text to comment on selected text with this easy to follow example."

Making Selections in Sublime Text

Sublime Text is an incredibly powerful text editor that offers an array of features for navigating and manipulating text. One of the most useful of these features is the ability to make selections. A selection is a range of text that is highlighted. Sublime Text offers multiple methods for creating selections.

To begin, open a text file in Sublime Text. Then, you can use the mouse to make a selection. For example, if you want to select the word “Sublime”, simply click and drag the mouse cursor over the word. Sublime will highlight the word as you drag. You can also select text by pressing the shift key and using the arrow keys. If you press shift and the right arrow key, Sublime will select the next character to the right. You can also use this method to select entire lines of text.

You can also use Sublime’s “Find” function to make selections. To do this, press “Ctrl+F” to open the Find and Replace window. Type in the text that you want to select and press “Enter”. Sublime will select all instances of the text. You can also use regular expressions to make more complex selections. For example, you can use the regular expression “[A-Z]” to select all capital letters in the document.

Sublime also provides a number of shortcut keys for quickly making selections. For example, pressing “Ctrl+D” will select the current word, and pressing “Ctrl+Shift+M” will select everything between two matching parentheses. You can also use the “Expand Selection to” command to select lines, words, paragraphs, and more. To open this command, press “Ctrl+Shift+Space”.


// Example of using Sublime Text's 'Expand Selection to' command

// Select the current line 
Ctrl+Shift+Space -> Line

// Select all the words in the document
Ctrl+Shift+Space -> Words

// Select all the paragraphs in the document
Ctrl+Shift+Space -> Paragraphs

By learning how to use Sublime’s selection tools, you can quickly and easily navigate and manipulate text. This can save you a great deal of time and make working with text in Sublime Text much more efficient.

Answers (0)