Ask Your Question
1

Search on current selection in current file

asked 2022-03-10 09:31:39 -0500

Joril's avatar

updated 2022-03-10 09:32:22 -0500

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)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-03-10 10:04:58 -0500

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.

edit flag offensive delete link more

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 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2022-03-10 09:31:39 -0500

Seen: 83 times

Last updated: Mar 14 '22