Sync Block Edit Simplifies Code Editing

| by Anand Narayanaswamy Follow 0 Followers on Dec 30, 2012. Estimated reading time: 1 minute |

A note to our readers: You asked so we have developed a set of features that allow you to reduce the noise: you can get email and web notifications for topics you are interested in. Learn more about our new features.

Sync Block Edit is a Visual Studio extension which automatically updates duplicate blocks of text in multiple files. It will be useful for updating the content in copyright files inside the source code in large applications or for updating large chunks of content such as comments. The extension can be accessed from the Visual Studio 2012 toolbar after the installation of VSIX file.

In order to work with Sync Block Edit extension you have to follow the steps:

  • Enclose the content inside one of the source file with a distinct begin and end signature lines

// BEGIN copyright starts
// Your content here
// END copyright ends

  • Select the block and click the Sync Update Block button from the Sync Block Edit toolbar

For example, if you have two forms (Form1 and Form2) in your Windows application, you only need to make the required change in Form1. The required changes will be automatically reflected in Form2.

Let us visually examine the usage of Sync Block Edit extension

Form1 with original content

Form2 with original content

Form1 with changes - Sync Update Block in Action

Update Text Dialog

You can select a required choice from the Target drop down. By default, the begin and end lines are populated with the required text from the source file.

Log Report

Form2 with changes

As you can observe from the above screenshots, I have only updated the content in Form1.

If you have not added the distinct begin and end blocks then you can create it using Sync Create Block button from the Sync Block Edit toolbar.

Create Block

  • Select the content for which you want to add begin and end blocks
  • Provide the content for the begin and end blocks
  • Select the target
  • Click the Create button

Block Added

The extension automatically adds the required begin and end lines depending upon the target you selected. If you select Entire Solution as target the block will be placed on all the files of the project.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you