Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacement of Delphi IDE "Sync Edit" in Visual Studio

There is a feature in Delphi IDE (Borland Developer Studio 2006) which allows to edit some variable in "sync mode". For example if you have a code snippet like this.

You can select the text you want to modify (in this case the complete procedure) and start editing a variable name. It will be edited at all the places (except string literals): screenshot.

It is different from refactoring since the scope of change is limited. Its simple and fast. I loved this facility.

Now I have started using Visual Studio for past some time and miss something like this. Please can you suggest anything to achieve the same effect in Visual Studio?

like image 240
Hemant Avatar asked Jun 25 '09 05:06

Hemant


2 Answers

For this feature you will probably have to use CodeRush from Dev Express.

It has something similar to this.

like image 139
Yogi Yang 007 Avatar answered Nov 09 '22 23:11

Yogi Yang 007


In Visual Studio 2005/2008 there is a similar feature. If you edit for example a variable or method name, a little red box appears at the bottom right side of the word. Click it or press Shift + Alt + F10 to open a small menu that allows you to rename all occurances of the identifier. However, that does not work for comments.

like image 26
Thorsten Dittmar Avatar answered Nov 09 '22 23:11

Thorsten Dittmar