Search and replace across files

I still do a lot of my coding by hand, so every now and then I need to do a global search and replace across several files. Notepad++ (see this post) has this feature built in. Simply open all the files needing the search and replace in Notepad++ (drag and drop works nicely for this) then press Ctrl+H to bring up the replace dialog. Fill in the find and replace text boxes and then click replace all in open documents. There’s a similar function on the find tab in the same dialog box that will find every instance of whatever you’d like in all of your open files. Then it will list them all with the surrounding text in the same dialog box. Just click on any one of them to jump right to it.
While you’ve got Notepad++ open. Press Ctrl+G to bring up the go to dialog box. You can jump directly to any line number from here. This is nice when debugging code and you get an error on line xyz. Make sure to read the dialog carefully, the guys who made Notepad++ seem to have a sense of humor.

Posted on January 30, 2009 at 11:00 am by Matt Walsh ยท Permalink
In: M@'s Picks, Tweak