Discussion


Google Groups
Know Thy Tools
Visit this group

Notifications

I post notifications of new content on this site to my blog at http://www.anthonycramp.name.

Licence

Editors‎ > ‎TextMate‎ > ‎

TextMate - Editing Multiple Lines

TextMate contains a handy feature that allows you select columns of text (across multiple lines) and enter or edit those contents simultaneously.

Consider the following text:

* text1
* text2
* text3

Suppose we want to replace the * at the start of each line with a #. This can be done as follows:

1. Position the cursor before the first *
2. Hold shift and press left arrow to select the *
3. Hold shift and press down arrow to select the other *. Don't worry that the complete lines are selected
4. Tap the Alt key. This reduces the selected text to just the column of *s.
5. Press the # and all *s are replaced simultaneously.
6. Press enter or move the cursor with the arrow keys to break the selection.