RAD Studio (Common)
ContentsIndex
PreviousUpNext
Using Sync Edit

The Sync Edit feature lets you simultaneously edit indentical identifiers in selected code. For example, in a procedure that contains three occurrences of label1, you can edit just the first occurrence and all the other occurrences will change automatically.

To use Sync Edit

  1. In the Code Editor, select a block of code that contains identical identifiers.
  2. Click the Sync Edit Mode icon SyncEdit icon that appears in the left gutter. The first identical identifier is highlighted and the others are outlined. The cursor is positioned on the first identifier. If the code contains multiple sets of indentical identifiers, you can press TAB to move between each identifier in the selection.
  3. Begin editing the first identifier. As you change the identifier, the same change is performed automatically on the other identifiers. By default, the identifier is replaced. To change the identifier without replacing it, use the arrow keys before you begin typing.
  4. When you have finished changing the identifiers, you can exit Sync Edit mode by clicking the Sync Edit Mode icon, or by pressing theEsc key.
Note: Sync Edit determines indentical identifiers by matching text strings; it does not analyze the identifiers. For example, it does not distinguish between two like-named identifiers of different types in different scopes. Therefore, Sync Edit is intended for small sections of code, such as a single method or a page of text. For changing larger sections of code, consider using refactoring.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!