Sync Ranges

From Delphi for PHP Documentation Wiki

Jump to: navigation, search

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

To create and edit a sync range:

  1. Select a portion of text
  2. Click on the Sync Edit Mode icon in the left gutter of the editor. Common identifiers are underlined.
  3. Click on an identifier and all identical identifiers will be indicated with boxes
  4. Begin editing the identifier. As you change the identifier, the same change is performed automatically on the other identifiers.
  5. When you have finished changing the identifiers, exit Sync Edit mode by clicking the Sync Edit Mode icon

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 and not for refactoring across an entire project.


Image:sync_ranges.png

Personal tools