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

In the Code Editor, select a block of code that contains identical identifiers.

Click the Sync Edit Mode 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.

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.

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.