Altium NEXUS Documentation

FindAndReplace

Created: 27.07.2015 | Updated: 05.06.2017

Parent page: TextEdit Commands

The following pre-packaged resource, derived from this base command, is available:


Applied Parameters: None

Summary

This command is used to access the Replace Text dialog, from where you can configure a search to locate and replace specific text - located in the current document, all text-based documents in the active project, all open text-based documents, or all text-based documents in a specified directory.

Access

This command can be accessed from the Text Editor (or any coding-aware variant of the Text Editor), by:

  • Choosing the Edit » Replace command from the main menus.
  • Using the Ctrl+H keyboard shorcut.

Use

After launching the command, the Replace Text dialog will appear. The dialog essentially operates in two modes, with functionality delivered courtesy of two tabs:

  • Replace Text - use the options on this tab to configure text replacement within the current document only. To replace only the first instance of matching text, click OK. If the Prompt on replace option was enabled, the text will be highlighted, with a dialog appearing to confirm the replacement. Click Yes to replace only this instance. You will have the opportunity to replace all matching instances from this dialog. Alternatively, to replace all from the start, click Replace All, rather than OK. Again, all matching instances of the search text will either be replaced directly, or through individual prompting, depending on the state of the Prompt on replace option.
  • Replace in Files - use the options on this tab to configure a text replacement across all text-based documents in the active project, all open text-based documents, or all text-based documents in a specified directory. After clicking OK, all instances of matching text found in the files coming under the scope of the search, will be replaced. Again, you can opt to be prompted on replacement by setting the Prompt on replace option beforehand. The Replacing dialog will appear to show progress of the replacement. Each replacement made will be listed as entries in the Messages panel. Each message will reflect the source file, the line on which the searched text was found, the entire text on that line, and the character position within that line at which the searched text string starts.

In each case, an information dialog will appear, summarizing the number of replacements made.

Tips

  1. Each message in the Messages panel is in the form (x, y): <OriginalLineText>, where x is the character position on line y of the document. The text shows the original text, prior to replacement.
  2. Files do not have to be open in order to replace text using the Replace in Files mode. Such files can optionally be opened after replacement by enabling the Open changed files in editor option, prior to performing the replacement.
  3. When using the Replace in Files mode, resulting replaced text can be cross-probed to, from the Messages panel entry - simply double-click on the message.
  4. See related options in the Find region, on the Text Editors - General page of the Preferences dialog.

 

Обнаружили проблему в этом документе? Выделите область и нажмите Ctrl+Enter, чтобы оповестить нас.

Связаться с нами

Связаться с нашими Представительствами напрямую

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
200 characters remaining
Вы сообщаете о проблеме, связанной со следующим выделенным текстом
и/или изображением в активном документе: