Sublime Forum

Find highlighted text

#1

When I hit select a word and hit Cmd-F, the word appearing in the search box is my old search and not the word I just selected. I am not sure, but I believe the behavior is different on the Windows version. Is there a parameter that I could set to get that behavior?

2 Likes

#2

Press command + ,

add the following line: "find_selected_text": true

6 Likes

#3

Great, exactly what I needed, thanks a lot. By curiosity, is that the default behavior on Windows too? And if not, why are there different default settings?

0 Likes

#4

The “Find selected text” option defaults to false on OSX to conform to standard Apple conventions. That way people who use other text editors such as textmate can switch over to Sublime painlessly.

0 Likes

OSX Find in Files behaves differently to Windows Find in Files
#5

That makes sense. If I may ask, how is a Mac user supposed to handle that then? Cmd-C, Cmd-F, Cmd-V?

0 Likes

#6

The flow seems to be Cmd-E and Cmd-F.

0 Likes

#7

To be honest, I don’t know. That was one of the first settings I changed and never looked back.

0 Likes

#8

Thank you Twen. Exactly what am looking for.

0 Likes

#9

You need to explicit copy

"find_selected_text": true

and paste into your sublime user settings.

See comment in original sublime settings:
“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.”

0 Likes

#10

Worked like a charm, thank you.

0 Likes

#11

On Apple CMD+E can be used to put a text into the find clipboard, it will immediately be placed in the find text box. But you still have to press CMD+F to show the find box and set the focus to it. I never got warm with CMD+E.

0 Likes