Editing

Overview

Sublime Text is brim-full of editing features. This topic just scratches the surface of what’s possible.

Multiple Selections

Multiple selections let you make sweeping changes to your text efficiently. Any praise about multiple selections is an understatement. This is why:

Select some text and press Ctrl + D to add more instances. If you want to skip the current instance, press Ctrl + K, Ctrl + D.

If you go too far, press Ctrl + U to deselect the current instance.

Transforming Multiple Selections into Lines

Ctrl + L expands the selections to the end of the line. Ctrl + Shift + L splits the selections into lines.

You can copy multiple selected lines to a separate buffer, edit them there, select the content again as multiple lines and then paste them back into place in the first buffer.

Column Selection

You can select a rectangular area of a file. Column selection makes use of multiple selections.

It’s possible to add blocks of text to or remove them from the selection.

Using the Mouse

Windows

Select Block Right Mouse Button + ⇧
Add to Selection Ctrl + Right Mouse Button + ⇧
Remove from Selection Alt + Right Mouse Button + ⇧

Linux

Select Block Right Mouse Button + ⇧
Add to Selection Ctrl + Right Mouse Button + ⇧
Remove from Selection Alt + Right Mouse Button + ⇧

OS X

Select Block Right Mouse Button + ⌥
Add to Selection ⌘ + Right Mouse Button + ⇧
Remove from Selection ⌘ + ⇧ + Right Mouse Button + ⇧

Using the Keyboard

Windows Ctrl + Alt + Up and Ctrl + Alt + Down
Linux Alt + ⇧ + Up and Alt + ⇧ + Down
OS X ⌃ + ⇧ + Up and ⌃ + ⇧ + Down

Other Ways of Selecting Text

The list is long; all available options can be found under Selection. To name a few:

  • Select subwords (Alt + Shift + <arrow>)
  • Expand selection to brackets (Ctrl + Shift + M)
  • Expand selection to indentation (Ctrl + Shift + J)
  • Expand selection to scope (Ctrl + Shift + Space)

Transposing Things

Need to swap two letters or, better yet, two words? Experiment with Ctrl + T.

And much, much more...

The Edit, Selection, Find and Goto menus are good places to look for handy editing tools. You might end up using just a few of them, but the rest will still be there for when you need them.