Sublime Forum

FindInFile Mac vs. Linux

#1

Hi, FindInFiles works differently on Mac vs. Linux, is it by design?
Linux: Select a word, Ctrl-Shift-F (or menu), it fills in the search pattern from the current selection.
Mac: Select a word, Command-Shift-F (or menu), the search pattern remains from the previous search.

(It seems like such a little difference, but find in files feature works very well and is fast so I use it a lot. I have been doing select, Command-C to copy, Command-Shift-F to find, Command-V to paste, but it is more awkward and I lose the clipboard contents.)

Using sublime 3083

0 Likes

#2

In “Default/Preferences.sublime-settings”:

    // 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

#3

Hi FichteFoll, Thank you, thank you!
You saved me not just the extra typing but also now there is consistency so I don’t have the mental pause to think about how to do it differently.

0 Likes

#4

On the Mac, the contents of the find field are a system-wide “first class citizen”, so to speak, just like the clipboard. You can use cmd+e in any Mac app to put whatever’s selected into the find box (and then search for it in another application with cmd+g—find next!). To anyone who uses this functionality about 1000 times a day on their Mac, the idea of selected text automatically going into the find field is just about as alien as the selected text automatically going onto the clipboard.

tl;dr: try using cmd+e on the Mac (and then binding that key combo on Linux as well!)

0 Likes