Editing

Warning

Development of Sublime Text has moved on to version 3.

As a result, this branch for Sublime Text 2 will not be updated any more. Please select the latest branch in the panel on the bottom left and consider updating Sublime Text.

Overview

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

Column Selection

Column Selection can be used to select a rectangular area of a file. Column selection doesn’t operate via a separate mode, instead it makes use of multiple selections.

You can use additive selections to select multiple blocks of text, or subtractive selections to remove a block.

Using the Mouse

Windows

  • Right Mouse Button +
  • OR: Middle Mouse Button

  • Add to selection: Ctrl
  • Subtract from selection: Alt

Linux

  • Right Mouse Button +

  • Add to selection: Ctrl
  • Subtract from selection: Alt

OS X

  • Left Mouse Button +
  • OR: Middle Mouse Button

  • Add to selection:
  • Subtract from selection: +

Using the Keyboard

Windows: Ctrl + Alt + Up and Ctrl + Alt + Down

Linux: Alt + + Up and Alt + + Down

OS X: + + Up and + + Down

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.

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 when you need them... warning: