The Replace Tool
by Shirley E. Kaiser, M.A.
Copyright © 2001-2017, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved. Published at websitetips.com with permission.
|Find||Ctrl + F|
|Replace||Ctrl + R|
|Shift + Ctrl + F|
|Shift + Ctrl + R|
In Part 1, you learned how to use HomeSite's Find Tool. The Replace Tool functions in a similar way to the Find Tool. We're going a step further, though, since HomeSite finds the text within your currently open, active page and then replaces it with the new text you've designated.
For purposes of this tutorial, we'll continue using the 'imagination' term, this time replacing it with 'creative aspirations' in the document.
Note that even though this tutorial was written with HomeSite 4.5.2 in mind that it also applies to HomeSite 5.x versions and to earlier versions.
On this page:
- From the drop-down menu, Click on Search, and then click on Replace, as shown in Example 2.1.
- The Replace pop-up box will appear, as shown in Example 2.2.
There are several options available within the Replace pop-up box, with the Default settings shown in Example 2.2 above.
For the direction this time there are the Up or Down radio buttons like the Find pop-up box, and there's also a Selection radio button. So you choose to replace the selection or to proceed either up or down the page.
Also like the Find pop-up box, you can choose Match whole words and Match case to help narrow your search.
Keyboard shortcut: Alternatively, you can use the keyboard shortcut, Ctrl+R, which will open the Replace pop-up box in one step.
- In the Find what text box, click on the black arrow to open the drop-down menu. You'll see the word 'imagination,' listed. Click on 'imagination,' as shown in Example 2.3 below.
- The 'imagination' term should now be in the Find what text box, as shown in Example 2.4.
- The next step is to add the text that will replace 'imagination.' Type 'creative aspirations' in the Replace with text box, as shown in Example 2.4 below.
You now have the choice of replacing one 'imagination' or replacing all of them on the page.
To replace all occurrences of the 'imagination' term on the currently open, active page, you would click on the Replace All button. HomeSite would then replace all occurrences of the 'imagination' term just with that one mouseclick.
To replace one occurrence at a time, you would click on the Replace button.
- For this tutorial, go ahead and click the Replace button.
- A Confirm pop-up box will ask if you want to replace the currently highlighted 'imagination' term. Click Yes, as shown in Example 2.5 below.
- If you want to change the next occurrence, you can click on Replace again, and HomeSite will advance to the next location of the word, 'imagination.'
If you reach the bottom of the document, a pop-up window will ask you if you'd like to proceed from the top of the document (as shown in Part 1, Example 1.5). Click Yes.
If you continue to click on Find Next, eventually a pop-up box will appear to let you know that there aren't any more occurrences of the term, 'imagination,' (as shown in Part 1, Example 1.6).
Question: What do you do if there are other uses of the 'imagination' term that you want to remain while replacing a few instances of the 'imagination' term?
Answer: One approach is to use the basic Replace Tool as shown in Part 2 above. This approach allows you to check each occurrence before it's replaced.
Another approach is to consider what is unique to the term you wish to replace. For example, it may always be followed by a period, a space, or is used in conjunction with another term. If there's something unique about it, then you can use the Replace All tool to quickly replace all the terms on a page.
Of course, you need to be careful about making multiple replacements to ensure that you only replace what you really want to replace. As you're learning to use these tools, I'd suggest making backup copies of your documents first. It's far easier to later delete an extra backup copy than to have to re-do a document.
See also the Troubleshooting Tips section at Part V: Tips for Success.
That's all there is to using the Replace tool.
Now that we've covered the basic uses of the Find and Replace tools, we're ready to move on to learning to use the Extended Find and Extended Replace Tools for multiple pages.
You can download a fully functional trial version of HomeSite through Macromedia's Web site.
Disclaimer: WebsiteTips.com and owner/editor Shirley Kaiser have no monetary affiliation with Macromedia or HomeSite.