Sublime Text - Column Selection



In this chapter, you will learn various shortcuts keys to move and select the columns of a file in Sublime Text.

Moving the Pointer to the Beginning of Code

You can use the shortcut Ctrl+Home to move the pointer to the beginning of the code in Sublime Text editor.

Observe the sample code shown here.

Sample Code

The screenshot given below shows the same code where the cursor is moved to its beginning.

Screenshot Cursor moved to Beginning

Extending a Column

You can use the shortcut Ctrl+L to extend a specified column. This shortcut will select the column which includes the pointer. The following screenshot explains this in a detailed manner −

Extending a Column

Trimming a column

You can use the shortcut Ctrl+K to trim the specified column of the file. For OSX, you will have to use the key combination Cmd+K for this purpose.

The example shown here displays the code where the line mentioned in the fifth column is trimmed.

Trimming a column

Split a Block of Text

You can use the shortcut Ctrl+Shift+K to split a selected block of text into two selections.

Split a Block of Text

Note − The difference in key combinations from the previous key combination is that columns are visible. Ctrl+Shift+K removes the column number from the specified code, whereas Ctrl+K keeps the column number intact after trimming the entire column.

Advertisements