Chapter 6: Searching

The Web Editor wants to help you stay organized, right? Well, how organized would you be if you had
to frantically search around for stuff that you lost when you could have a program do it for you? That’s
why there are two great options for searching with the Web Editor:

The Magic Search Bar

The Find & Replace Tool

With the combination of these two tools, you’ll stay organized and get your project done fast. If only
you could use it to find your car keys!

The Magic Search Bar

Does your project contain hundreds of files? Need to locate a specific file? Don’t remember the exact
name of the one you really need? The Magic Search will save you.

See that box in the upper-left corner with the magnifying glass next to it? Type something into it.

Sure, you can type in the exact file name and the search will find it instantly, but you can also type in
any number of characters that you think are part of the file name. The search results will include any
file that includes those characters in that order.

There are a couple of other filtering options that you can mess with if you click that magnifying glass:

Order

To clear out the search results and display everything in the Project Explorer again, click the X.

Find & Replace

Just when you thought you had all the tools you need to really conquer the web, along comes the
incredibly powerful Find & Replace tool. You can open this window by hitting Cmd+F or going to Edit >
Find > Find…

There’s a whole slew of options here, but here’s what it basically comes down to: You can search for
text (partial match, “starts with”, or exact match) in the currently selected document, open documents,
or all documents. When a match is made, you have the option of replacing it with text that you
provide.

Let’s take a close look at each of those functions.

Inputs

There are two input boxes on this screen.

Find: Enter text you would like to search for in this input box

Replace: Enter text you’d like to replace found text with

“Find” Parameters

To the right of the “Find” input box are two drop-down menus with options that determine how
matches are made. The upper drop-down has three choices that relate to the text provided:

Contains: Provided text just needs to match part of text in the document(s)

Starts with: Partial matches must begin with the provided text

Whole word: Provided text must exactly match text in the document

The lower drop-down has three choices that determine which files are searched:

Current Document: Only the document in the currently selected editor is searched (Cmd+T)

Open Documents: Documents in both editors are searched (Alt+Cmd+F)

All Documents: All documents in the Project Explorer are searched (Shift+Cmd+F)

Buttons

There are six action buttons that can be used to find and/or replace text.

Find: Searches for and highlights the first match from where the cursor is placed for the provided
text

Replace: Replaces the currently selected match with the text provided in the “Replace” field

Previous: Goes back to the last match (Cmd+G)

Next: Goes to the next match (Shift+Cmd+G)

Replace All: Automatically replaces all matches with the text provided in the “Replace” field
(This tool might become your best friend!)

Replace & Find: Replaces the current match with the provided text and goes straight to the next
match (This tool might try even harder to be your best friend!)

Match case

Check this box if you want search results to exactly match the provided text’s capitalization.

Remember, the Find & Replace tool isn’t just for searching. If there’s some mundane replacement task
that you’ve got to accomplish (such as swapping a bunch of smart quotes with regular quotes), Find &
Replace can save you precious minutes that could be spent doing something more gratifying, like clipping
your toenails. Hey, no one wants to do those remedial tasks—no one except the Web Editor! Why
not indulge it?