How to do a global search/replace across files in Eclipse 3.2
The location of this command is not very intuitive. To search and replace in multiple files you need to select "Search" > "File...".Step by step:
- Select the text in a file
- From the "Search" menu, select "File...". This will bring up the "Search" dialog box.
- At the bottom of the dialog, click "Replace..."
- This will bring up the "Replace" dialog box where you can type in your replacement text and replace individual occurrences or all occurrences.
16
Comments
—
Comments feed for this post
#2 LindsayStanleyKay commented on 2007-12-21:
I'll second that, cheers! I was about to hunt for some sort of plugin to do global search and replace!
I wonder if there is any way to do refactoring across multiple projects, ie. update import statements, references in dependent projects etc?
#3 Igor Milovanović commented on 2008-06-15:
thanx. that was what i was looking for... sometimes you just need to look a few more seconds :)
#4 asawari commented on 2008-07-09:
Hi...I am developing an application in eclipse rcp.I want to implement this multifile search functionality as is in eclipse in my application.can you help me with what plugins I should use.
#7 Wojtek commented on 2009-11-24:
well, Eclipse UX sucks. Thanks for revealing this so hidden (really) functionality
#8 jim pruett commented on 2010-07-22:
'have been using Eclipse for 12months and you have finally shown me how to do File-S/R... Thanks!
#11 Scott commented on 2011-10-13:
Yes thank you :) I was having trouble find it also. I think they might be trying to save us from accidentally replacing content in a ton of files we weren't expecting. A bit of a sanity check before doing the replace. They could accomplish the same thing with a warning message with the number of files that will be affected though :p
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(6)
-
android
(2)
-
aws
(10)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(13)
-
conkeror
(2)
-
core
(2)
-
cygwin
(17)
-
datastructures
(15)
-
datetime
(4)
-
decorators
(4)
-
django
(41)
-
emacs
(22)
-
files_directories
(12)
-
git
(6)
-
hardware
(6)
-
install_setup
(8)
-
javascript
(3)
-
keyboard
(9)
-
matplotlib
(6)
-
mercurial
(4)
-
nginx
(2)
-
persistence
(6)
-
preferences
(7)
-
processes
(4)
-
pyqt
(18)
-
python
(157)
-
ratpoison
(3)
-
regexes
(6)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(14)
-
ssh
(12)
-
subversion
(6)
-
twisted
(7)
-
ubuntu
(66)
-
urxvt
(5)
-
vxworks
(25)
-
webdev
(8)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Marty Alchin
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan
#1 Tom commented on 2007-09-23:
Thank you!
I was having trouble finding this. Very useful for large projects.