Finding and Replacing Codes (and Styles)

(See also: Edit: Find and Edit: Replace)

Image shows Edit: Replace dialog

In order to find and replace DBT codes or styles, you must switch the DBT editor window to "Coded View." In this mode, DBT codes appear between square brackets and DBT styles appear between angle brackets. The shortcut to go into (and out of) Coded View is Alt + F3.

Imagine your editor window holds the following text.

I now want to skip two lines[sk2]
But I really meant three lines[>]

Finding and replacing DBT codes is similar to finding and replacing text as described in Edit: Find and Edit: Replace. However to enter a Code in the "Text to find:" or "Replace with:" text fields, you must press the F9 key to enter the code. (See Note below.) You will observe that both left and right square brackets appear with your cursor positioned between them for entering the code.

If you wish to find and replace not a code but a style, press Ctrl + F9 (See Notes below.)

You may now enter the code you wish to find or replace. Remember, do not enter the square brackets!

Image shows Edit: Replace dialog section with DBT Code [sk2] as text to find.

Note that having typed a code, your cursor remains located between the square brackets. If you wish to find or replace text in addition to the code, you must position your cursor accordingly before you begin typing text..

Image shows Edit Replace dialog with text and code to find and replace

The example above would specifically look for the code shown followed by the word "But". Anything other combination following that code will be ignored.

In the "Replace with:" text box, type in whatever you wish to replace what is found.

Some additional option check boxes allow you to refine the process.

Case sensitive: If you wished, for example, to replace the word "Braille" (capital B), with the word "braille" all in lower case, you need to check this box.

Backward Search: This allows you to search from your current place in the document to the beginning.

Find whole words only: For example, you might wish to find "code", but not "codependence".

Replace stylename: This allows you to search for a style and replace it with another Style.

Tip: If you are unsure of a code, you can press the F5 key at any time to bring up a list of DBT codes. See also: Layout: Code List.

Notes: On systems with English keyboard layouts, you can also use the Ctrl key, and press the left square bracket key to bring up the code dialog, or Ctrl + Shift + < to bring up the Style dialog.

It is also important to note that some Style names include a period (full stop) at the end of the name. When present, this period must be included when you search for or replace a style name.