Topic: https://brettterpstra.com/2014/07/23/sublime-text-selections/
hide preview

What's next? verify your email address for reply notifications!

pmurillo 10y, 235d ago

Brett, this is a very nice collection of text selection shortcuts. I learned a couple of interesting tricks. Thanks.

There is, however, something that I really miss in Sublime Text's 3 text selection capabilities:

I'd be really useful for me to be able to extend the selection to include the next word to the right of the current one.

The way I would like this to work is as follow: pressing once the shortcut associated with this new command would select the word under the cursor (same behaviour as the command + d shortcut).

Hiting the shortcut again would expand the selection to also include the word located to the right of the currently selected one.

Does anybody know how to achieve this? I guess it is possible to write a plugin, but I'm not experienced enough in Sublime's plugin architecture to achieve this right now.

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 10y, 235d ago

It would be easy enough to do with just a Macro, but ⌥⇧→ (or ^⇧→ to select to word separators) works fine for me. The thing you lose is the "select all" capability that ⌘D has, meaning that when you run it, every instance of that word is highlighted. If you extend the selection at that point, you have to use ^⌘G to get that back.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

pmurillo 10y, 234d ago

Thanks, ^⇧→ works very well for me. I was overcomplicating things a little bit. Thanks for remind me of these shortcuts.

hide preview

What's next? verify your email address for reply notifications!

elmimmo 10y, 238d ago

Oh, also handy is ⌘⇧V: paste reindenting at current indent level.

hide preview

What's next? verify your email address for reply notifications!

elmimmo 10y, 239d ago

I also use on a daily basis ⌘E: feed search field with currently selected text. While ⌘D and ⌘^G sidestep the search field altogether for searching in the currently active document, ⌘E is handy for taking a string as a starting point for a search string that you want to edit and for multi-file search.

hide preview

What's next? verify your email address for reply notifications!

DaveHein 10y, 240d ago

Thanks for this. I had no idea these existed. Or maybe I forgot they existed.

I guess I should RTFM ( http://www.sublimetext.com/... ) regularly, perhaps once a month until I stop learning useful things.

hide preview

What's next? verify your email address for reply notifications!