It's easy to use Adobe HomeSite to do a search and replace over either the current file, selected files, or every file in your Web site. And once you're used to using global search and replace, you'll wonder how you ever lived without it.
Difficulty: Easy
Time Required: 5 minutes
Here's How:
- To search in one file:
Open the file to edit in HomeSite. - Go to "Replace" in the "Search" menu, or click Ctrl-R.
- Type the words to find in the find box and the words to replace in the replace box.
- Click "Replace". Keep clicking replace until HomeSite has replaced all the instances on the page.
- To search across an entire Web site:
Open HomeSite. I like to open one file in the project, just so I have something to start with, but it's not required. - Go to "Extended Replace" in the "Search" menu, or click Shift-Ctrl-R.
- Type the words to find in the find box and the words to replace in the replace box.
- Make sure "All open documents" is selected if you want to search only the files you've got open for editing, "In folder" to search all files in a specific folder, or "In Project" if you want to search all pages in a project. Then click "Replace".
- HomeSite will then show you all the places where your search string was found. The results will be displayed in the Search pane below your site window.
Tips:
- In order to avoid matching on items that shouldn't be replaced, create a find string that is very specific. For example, the string "in" would be found inside words ("tin", "insider", etc.). You can include parts of your find phrase inside your replace phrase. For example, if you wanted to replace "in the matter of" with "on the matter of", you should include all the words in your search string and replace string. Just searching for "in" will result in every instance of that word being replaced with "on".
- HomeSite allows you to select options to narrow down the search:
- Match case matches the exact upper case or lower case of the text you type in. "In" will not match "in".
- Regular expressions lets you search with wildcard characters.
- Skip tags while searching will ignore results inside HTML tags.
- Exclude binary files will ignore non-text files while searching.
- Display Line Info shows the line number of the results.
- You can double click on the results to see what was changed, and make edits.
What You Need
- Adobe HomeSite


