Sublime Forum

What's the best way to select whole words?

#1
foo
foobar
foo bar

I often select a word (e.g foo) and the matches are highlighted, when I press ctrl+d to select the next whole word match, if there’s an occurence of the word attached to another (e.g foobar), it is selected instead.
what’s the best way to select only whole words that match the selection ?

0 Likes

#2

ST takes the settings from search (ctrl+f) for this, so setting the search to “Whole word” should do what you want if I understand you correctly.

Edit: Hm, okay, it does not seem to work that way for me either with ctrl+d confused

0 Likes

#3

If you do not select the word, just having your cursor in the word, pressing ctrl+D will select it and enable whole word selection.
And it you already know you want to select all occurrence of the word use alt+F3 instead.

1 Like