Search and Replace

Use the search command for a specific word, phrase

Complex documents can become very large. Often we need to find text within a document but do not know where it is located. Hence the ordinary navigation features are not suitable. Writer provides a very important feature for the purpose, namely the search or find feature.

  1. Edit->Find->Replace or Ctrl+F.

    This will display the following dialogue window:

  2. Enter the text you wish to search for in the Search for window. This can be a part of a word, a whole word or a phrase.

  3. If you are looking for this word specifically and not as part of other words, tick the Whole words only check box. Otherwise leave it blank.

  4. If you wish to find only occurrences that are not only the same letters but the same letters and case, tick the Match case check box. Otherwise leave it blank.

  5. You may search backwards from your current cursor position by ticking the Backwards check box.

You now have two options:

Find all

  1. Click Find all to highlight all occurrences of the search text.

  2. Click Close. All the occurrences will be highlighted.

  3. Scroll through the document.

  4. Press Esc when you are done.

Find

  1. Click Find to locate the next occurrence.

  2. Writer will jump to the next occurrence of the search text.

  3. Click Find again to jump to the next occurrence.

  4. You may change any Options you as work.

  5. Click Close when you are done.

  6. The last occurrence will remain highlighted.

  7. Press Esc when done to remove the highlighting.

Use a simple replace command for a specific word, phrase

The same dialogue allows us to change either all or specific occurrences of a word, phrase or text to something else.

Suppose we have some text in which the word “show” occurs a number of times. We wish to replace this with the word “exhibit”.

  1. Edit->Find->Find and Replaceor Ctrl+F.

  2. Enter the word you wish to replace in the Search for window.

  3. Tick Backwards if you wish to replace text from the current position backwards. Leave it blank to replace in a forward direction.

Global replacement

  • Click Replace all. This will replace all occurrences without any further interaction. A window will be displayed indicating how many changes were made.

Undo the global replacement

  • Edit->Undo. If you execute this command immediately after the replacement, Writer will indicate that the last operation was a replacement in the menu. The action of the command will be to restore the workspace to its state prior to the replacement.

Selective replacement

  1. Click Find. This will locate the first occurrence.

  2. If you wish to change this occurrence, click Replace. Writer will then jump to the next occurrence. Otherwise, Click Find to skip without making any change.