Pocket Tools

Pocket Tools › Find & Replace with Preview

Google Docs add-on

Look before you replace.

Google Docs will tell you it replaced 47 things. It will not tell you which 47. This add-on shows you the list first, and will not replace anything that is not on it.

What it is

A sidebar for Google Docs that adds the two things the built-in find and replace does not have: a list of what it is about to change, and search by formatting. It runs entirely inside the document — there is no server and nothing is uploaded.

The sidebar: a Text / Formatting / Both switch, then a "What to find" section and a "What to change it to" section, a range picker and a Find button.
One panel, in the order you read it — what to find, then what to change it to.

Opening it

Extensions → Find & Replace with Preview → Open. The panel opens on the right and stays with the document you are in.

The loop

  1. Say what you are looking for — text, formatting, or both.
  2. Press Find. Nothing in your document changes. You get a count and a list, each row showing the match with the words around it.
  3. Replace — everything at once, or one row at a time.

If you change the search conditions, the selection, or the document after pressing Find, the list is marked out of date and replacing is blocked until you search again. The list and the replacement can never disagree.

A list of 10 matches for "Bluebird", each row showing the match highlighted in its surrounding text, with a replace link, and Replace all / Save this search buttons below.
Ten matches, each shown in context — including the ones in the header, the table and the footer. Nothing has changed yet.

Finding by text

Type what you are looking for. Press Enter to search, Shift+Enter for a line break.

Finding by formatting

This is the part Google's own find does not have. Switch to Formatting or Both and you can search for how text looks.

Both means the text and the formatting have to match — useful for "every bold occurrence of Figure, but not the plain ones".

Formatting conditions: bold selected, font Arial and colour ticked, size unticked and greyed out; below, the replacement formatting with font Georgia and size 12.
Left of each row is a tick box: a value can sit in the box without being part of the search. Unticked rows are greyed out.

Replacing

A replace is one undo step — Ctrl+Z once in the document puts everything back, however many matches it changed.

The same list of matches, greyed out, under a red warning reading "The search conditions changed — this list is from the old ones."
Change the search after pressing Find and the list is marked stale. Replacing is blocked until you search again — the list and the replacement can never disagree.

Where it searches

ScopeWhat it covers
Whole documentBody text, tables, footnotes, headers and footers — the parts most tools quietly skip.
SelectionOnly what you have selected in the document right now.
Tables onlyEvery table cell, nothing outside them.
Footnotes only
Headers & footers only

Saved searches

Press Save to keep a search under a name — every condition is stored, not just the text, and comes back exactly as you left it. Saved searches live in your Google account, so they follow you to any document. The free version keeps three; the count never runs down however often you use them.

Export and Import move them between accounts as plain text.

Two saved searches named "Codename to product name" and "Straighten quotes", with a 2 / 3 counter.
Saved searches keep every condition, not just the text.

Still stuck?

Common problems and what to put in a bug report are on the support page, or write to [email protected].