Sublime Text’s Extend Selection to Word in TextMate 2

One of the coolest features of Sublime Text 2, in my opinion, is the ability to use the command, “Extend Selection to Word” with Sublime Text’s multiple cursors. Using this command, one can highlight a word they want to change, select the command (or the key command equivalent) which selects the next instance of the word with multiple cursors and then you can replace both words (or as many words as you select) by typing once. I thought that TextMate 2 was missing this feature and that I would have to replace words one at a time or rely on replacing all within a selection. It turns out, though, that TextMate has this feature as part of the Text Bundle.

By default, the “Extend Selection to Include Next” command is bound to the Control-w keys and is available in the Text bundle under Menu Actions > Selecting.

Extend Selection to Include Next

You can, of course, change the key binding (I made it the same as I have it in Sublime Text 2 – Command-D). I absolutely love this feature and am glad to see that it is available in TextMate 2.