Using IntelliJ IDEA. I have a find that returns hundreds of instances of lines of code I need to change across maybe 150 files.
After each change, I'm having to hit ctrl-shift-f to bring back up the file search, wait for the new search, then click on the next occurrence to repeat my change.
This is a drag, to say the least. It would be helpful if there was a way to go to the next occurrence of find in file. F3 doesn't get it done. Is there really not a way to do this?
Using IntelliJ IDEA. I have a find that returns hundreds of instances of lines of code I need to change across maybe 150 files.
After each change, I'm having to hit ctrl-shift-f to bring back up the file search, wait for the new search, then click on the next occurrence to repeat my change.
This is a drag, to say the least. It would be helpful if there was a way to go to the next occurrence of find in file. F3 doesn't get it done. Is there really not a way to do this?
Share Improve this question asked Mar 21 at 13:23 ThomThom 15.1k33 gold badges116 silver badges199 bronze badges 5- I don't use IDEA, but isn't there a "search and replace" function in that tool? Ctrl + Shift + R or something, that lets you replace all instances of a string in a file or a project with a different string? – TylerH Commented Mar 21 at 13:29
- E.g. this: stackoverflow/questions/38342752/… – TylerH Commented Mar 21 at 13:30
- @TylerH There is a search and replace, but these changes are potentially not unified and I can't risk making a bunch of other unintended changes, so I need to look at each one. – Thom Commented Mar 21 at 13:39
- So if you have to look at each one, what is it you're asking for here? Shouldn't making the change not impact the search results in the Find/Search & Replace results, or at worst just remove the entry that was just modified? That's how other IDEs work, at least. – TylerH Commented Mar 21 at 14:14
- I'm looking for a way to go to the next occurrence of the find. – Thom Commented Mar 21 at 16:31
1 Answer
Reset to default 1There are two ways that come into my mind:
if you use the Find window to replace something, you can put the replacement code in your copy/paste buffer and navigate with the down/up key in the search results to replace in the lower code preview pane of this window
if you show the results using "open in find window", you can use the up/down keys or the shortcuts Ctrl+Alt+Up / Down key to navigate between the results there.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744350329a4569935.html
评论列表(0条)