Finding Text with a Simple Search


Simple searches work pretty much the same way that they do in a word processor. Just enter the text you want to find and the text that you want to replace it with, and away you go. Of course, you don't have to replace text; if you want you can just use the Find and Replace dialog to find text in one or more files.

To find text:

1.
Choose Edit > Find and Replace, or press Ctrl-F (Cmd-F).

The Find and Replace dialog appears.

2.
From the Find in pop-up menu, choose one of the options for the scope of your search.

3.
From the Search pop-up menu, choose Text.

4.
In the Find field, type the word or phrase that you're looking for.

5.
Click the Find Next button.

Dreamweaver finds and highlights the found text. If the scope of the search included more than one page, Dreamweaver opens the first file the text was found within, and highlights the text. If the text isn't found, you'll get a message to that effect at the bottom of the Find and Replace dialog.

or

Click the Find All button.

Dreamweaver does the search, closes the Find and Replace dialog, and opens the Search tab of the Results panel ( Figure 4.40 ).

Figure 4.40. The Search tab of the Results panel shows you the file name and matched text when you click the Find All button.


6.
If you clicked Find All in step 5, double-click one of the search results in the Results pane to open it and highlight the found text.

Tips

  • If you select some text before you bring up the Find and Replace dialog, the text automatically appears in the Find field, as long as you selected fewer than 255 characters .

  • You can do a quick find on the current page by selecting some text and choosing Edit > Find Selection, or by pressing Shift-F3 (Cmd-Shift-G). Dreamweaver will highlight the next occurrence of the text you selected.

  • You can click the green triangle button in the Results panel to reopen the Find and Replace dialog with the same search terms.

  • If you have a search that's running for a very long time, you can cancel it by clicking the octagonal red Cancel button in the Results panel.

  • You can clear the search results in the Results panel by right-clicking in the panel and choosing Clear Results from the resulting shortcut menu.


To find the next result:

  • Choose Edit > Find Next, or press F3 (Cmd-G).

    Dreamweaver finds and highlights the next result of the search, without reopening the Find and Replace dialog.

To find and replace text:

1.
Choose Edit > Find and Replace, or press Ctrl-F (Cmd-F).

The Find and Replace dialog appears.

2.
From the Find in pop-up menu, choose one of the options for the scope of your search.

3.
From the Search pop-up menu, choose Text.

4.
In the Find field, type the word or phrase that you're looking for.

5.
In the Replace field, type the replacement word or phrase.

6.
Click the Find Next button.

When Dreamweaver finds the text, it is highlighted.

7.
Click the Replace button.

Dreamweaver replaces the found text with the contents of the Replace field.

or

Click Replace All.

Dreamweaver warns you that you cannot undo changes made in unopened files. Of course, you can undo changes in any open documents by choosing Edit > Undo. If you still want to make the changes, click Yes.

Dreamweaver searches through the entire scope of the search, replacing all occurrences of the found text. When it is done, you'll see a message telling you how many changes it made.

Tips

  • Use a Replace operation to expand abbreviations and save time while you're creating pages. For example, let's say that you're creating a Web site about JavaScript. Rather than typing JavaScript again and again while writing the site, just type "JS," then before you upload the site, do a Find and Replace, changing every occurrence of "JS" to "JavaScript." You can do the same thing with company or people's names , or almost any text that you repeat a lot.

  • Dreamweaver does not update the Search tab of the Results panel when you perform Replace operations.

  • If you get a bunch of search results, but you only want to make replacements in some of those results, you can do that, and save a bunch of time in the process. Rather than opening each page separately and applying the replacement, do it all in one swoop by using the Results panel and the Find and Replace dialog together. First, click the green triangle in the Results panel, which reopens the Find and Replace dialog. In the Results panel, Ctrl-click (Cmd-click) the results where you want to make replacements . Those lines will highlight. Then switch back to the Find and Replace dialog, and click Replace ( not Replace All). The files that are modified are marked by a green dot next to their names in the Results panel.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net