Sublime Forum

Find in Project Live Search Results

#1

When I perform a Find in Project, I would like the results to be live so that I can edit the file in the search results instead of opening up each file to make the changes.

I would never have thought of this except because of the excellent multi-cursor support. When I put my cursor in the search results, perhaps it could put the cursor on the underlying file at the same time. Of course, the multiple cursor feature would work in the result pane too, such that I could pick the search result lines I want to edit, and edit them all in place.

I definitely realize this is not trivial, but I think would be awesome.

Thanks for considering.

0 Likes

#2

That is one crazy-assed idea… but sounds like a great experiment for search and replace over a large scope. +1

0 Likes

#3

Thanks for the vote willi297. I really do hope this is considered. It would seriously change my workflow.

0 Likes

#4

Notepad++ has a similar feature, but it does it over all open buffers rather than blindly over some find result. This might be a better option, cuz it would allow you to preview the results and it would simply mark the affected buffers as ‘changed’, so you could still do a post-sort if needed. Of course a save-all would just accept it blindly.

It would still be great to see the changes happen in the find results too though, cuz then it would all be in one place… hmmm…

feedback?

0 Likes

#5

Greg,

I am not a Notepad++ user. I will download it. How do I see this feature which is similar?

Thanks,

John.

0 Likes

#6

You simply use the normal Find dialog in Notepad++. They added an extra button to Find/Replace in all open buffers. Therefore, it’s a 2 step process. FIrst, do initial “Find in All Files”. Once you have all of the files/buffers open you wat to change, use the “Find/Replace in Open Files” button to make it happen. The buffers will be modified, but not yet saved, as a last means to revert.

The other advantage the NP++ Find/Replace has over Sublime, is the find results pane. The find results of each file are collapsible, which I usually use a a note-to-self that I am done with a particular file if I am sorting through a large list. Also, I think the find results pane highlights each found item as you click on it. This also serves as a placeholder.

I think Sublime could really benefit by adding some similar goodness. I think a “Replace in Open Buffers” option along with “Collapsible Find Results per File” would be my vote for an initial implementation. I am pretty sure the first could be done in a plugin, but the second would be a tweak to the find results panel needed in the Sublime core.

0 Likes