Sublime Forum

Alt + F3 - Select just words, not inline text i.e. "every" only not "everything"?

#1

Hi Sublimer Friends.

I’m just sorting out keywords in a huge keyword list,
I used CTRL+D before or ALT+F3 , however it does select everything, not just words by itself.

like “every” would be selected in “everything”, but I just want to select all words like “every” by itself.

How can I do that?

Would be great to add a new hotkey for that:
maybe Shift+Alt+F3. Would be very useful from time to time!

I believe there must already be a way, but I didn’t found it yet.
Already looked here http://www.sublimetext.com/docs/selection and other places on the webs

Can you please explain?

Best regards
Pro

1 Like

#2

any help / workaround for that simple task?

0 Likes

#3

One way to do it would be to use Ctrl+F to open the find panel and enter the text that you want to search. Make sure that “Whole Word” is turned on (it’s the button with an icon that looks like double quotes ""). Then press the Find All button to select all occurrences.

You can shorten this a bit by setting find_selected_text to true; then if you select the text you want to find before you open the find panel it will be filled into the search field automatically:

// If true, the selected text will be copied into the find panel when it's
// shown.
// On OS X, this value is overridden in the platform specific settings, so
// you'll need to place this line in your user settings to override it.
"find_selected_text": true,
0 Likes

#4

If you manually select ‘every’ from everything, then use Alt+F3, it will select every occurrence, regardless of whether it’s part of a word. The problem is Ctrl+D, which will always select a whole word in accordance with the language rules of the current syntax.

So use manual selection, either via keyboard (alt+shift+left/right can be useful here) or mouse, then Alt+F3 (Ctrl+Cmd+G on Mac) to select every occurrence of that in the buffer.

:slightly_smiling:

0 Likes