Search This Blog

Sunday, June 2, 2013

Sublime multi-selection keyboard shortcats

We have discussed the benefit of Sublime editor in our previous posts. In this one we will show how to use efficiently the multi selection feature.

Keyboard shortcat for random multi selection

With Ctrl + D you can create multiple selections when editing text. But when combining it with Ctrl + K you can skip some matches.

Example:
Copy the following text into your editor:

`Example text. This is an example text. Text has only one line`

Test 1:
Ctrl-F to find all `text` string.
Press Ctrl+D twice times.
Escape to get back to editor from the search dialogue.

You created a three word multi selection. You can edit word in 3 different places at once.

Test 2:

Ctrl-F to find all `text` string.
Press Ctrl+D once. It creates 2 word multi-selection.
Press Ctrl+K once. It ignores the last selected work. It gets back to single word selection.
Press Ctrl+D second time. It creates 2 word multi-selection.
Escape to get back to editor from the search dialogue.

You created a 2 word multi selection. You can edit the 2 words simultaneously. We skipped the word in the middle.

Of course you can always use ctrl+u to return to a previous selection :).

Sublime Cheat sheet 

A short summary (more can be found here and on internet)

Ctrl + D    repeat multi-­select word
Ctrl + K    skip multi-­select word

No comments:

Post a Comment