First time here? Check out the FAQ!
1

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
104
Joril
asked 2022-03-10 09:31:39 -0600, updated 2022-03-10 09:32:22 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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
4.2k
Wingware Support
answered 2022-03-10 10:04:58 -0600
edit flag offensive 0 remove flag delete link

Comments

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 -0600) edit
1

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 -0600) 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