johnturek / advanced-find

Automatically exported from code.google.com/p/advanced-find
0 stars 0 forks source link

Find and Replace in selected scope #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Could you add the support for search and replace in the current document 
selected lines? As a new scope I mean...

This is a very useful feature when working with big files and you want just to 
replace some instances of a value...

Original issue reported on code.google.com by trevi55 on 5 Jan 2011 at 12:54

GoogleCodeExporter commented 9 years ago
i will think how to do for that.

Original comment by swatch.c...@gmail.com on 6 Jan 2011 at 1:07

GoogleCodeExporter commented 9 years ago
Just for information... I've already implemented this...

I just need some time for optimizations, and I'll send you the patches 
(including some fixes for replace-all, and replace)

Original comment by trevi55 on 6 Jan 2011 at 2:30

GoogleCodeExporter commented 9 years ago
Here you are my implementation.

It includes full support for search and replace in selection scope, with 
dynamic contols also in the GUI side (based on the selection status).

Everything seems to works well here :)

The standard find and replace (not find-all / replace-all) implementation 
should be improved imho, using highlighting instead of selection; this would 
allow a correct "find in selection" implementation; since actually when a 
result is found the old selection is cleared... :/

I've attached both the splitted patches (the ones from 0001-* too 0005-*), and 
the complete patch made against the advanced-find plugin version 0.6.1

Original comment by trevi55 on 6 Jan 2011 at 3:48

Attachments:

GoogleCodeExporter commented 9 years ago
Hi trevi55,
Thanks for your patch, but i won't implement this feature by that way. In my 
think, search scope are used for find-all/replace-all, not for standard 
find/replace. So, the implementation i think is "searching all occurrences in 
the selection text and placing the results in the bottom panel". 

Original comment by swatch.c...@gmail.com on 6 Jan 2011 at 6:23

GoogleCodeExporter commented 9 years ago
This feature is implemented at v0.7.0. 

To use this feature,
1.Open the find/replace dialog and set the search pattern.
2.Select the text that you want to search.
3.Click the find all /replace all button
4.The results will list in the bottom panel and the occurrences will be 
highlighted.

Original comment by swatch.c...@gmail.com on 6 Jan 2011 at 3:05