First time here? Check out the FAQ!

Search on current selection in current file

The "search in files" toolbar group has a very useful icon, "search on current selection using the Search in Files tool", that shows every occurrence inside the project of the selected string.
Is there a way to have a "search on current selection" limited only to the current file?
(I'm on Wing 7.2.9)

Joril's avatar
asked 2022-03-10 09:31:39 -0500, updated 2022-03-10 09:32:22 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


Yes, you can use the command batch-search(look_in="Current File") to do that. This can be bound to a key binding or custom icon. You may have to use a different string than "Current File" for a non-English locale, to match what the string is for doing current file search in the active language.

Wingware Support's avatar
Wingware Support
answered 2022-03-10 10:04:58 -0500
edit flag offensive 0 remove flag delete link


Nice, thanks! There's a little side-effect though: this changes the "look in" combo, so when I use "search on current selection using the Search in Files tool" it keeps searching only in the current file... I guess I'll make two custom icons :)

Joril's avatar Joril (2022-03-10 10:09:54 -0500) edit

Yes, it does update that so a second command is needed to go back to searching in the project or whatever.

Wingware Support's avatar Wingware Support (2022-03-10 10:12:46 -0500) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer