Visual Studio Tips & Tricks : Techniques to be more productive in Visual Studio.
Updated: 1/21/2005; 10:19:48 AM.

 








Subscribe to "Visual Studio Tips & Tricks" in Radio UserLand.

Click to see the XML version of this web page.

 
 

Tuesday, July 30, 2002

How to quickly bookmark the current cursor position while searching a document

  1. Make some sort of change at the current cursor position (e.g. space)
  2. Go and search the document by selecting Edit->Find (Ctrl+f)
  3. When ready to go back to the bookmarked position, just select Edit->Undo (Ctrl+z)

9:16:57 AM    comment []

Searching and replacing text across multiple files

  1. Select Edit->Find in Files from the main menu.
  2. Populate the dialog appropriately and perform the search.
  3. Select Tools->Record Quick Macro (Ctrl+Shift+R) to begin macro recording.
  4. Press F4 to goto the next error tag (in this case it will be a line in the "Find in Files" tab).
  5. Select Edit->Find (Ctrl + F) and type in the search text and perform the search.  At this point the search text should be highlighted.
  6. Overwrite the search text with the replacement text.
  7. Select Tools->Stop Recording (Ctrl+Shift+R) to stop macro recording.
  8. Select Tools->Play Quick Macro (Ctrl+Shift+P) to play the macro.

After recording the macro - I recommend just holding down the Ctrl+Shift+P combination until the currently highlighted line in the "Find in Files" tab reaches the end.  Note that if you do not stop playing the macro after reaching the end, you begin at the top of the "Find in Files" tab all over again.  Don't worry if you accidentally run the macro when you didn't mean to - just select Edit->Undo (Ctrl+z) to undo macro modifications.


8:49:16 AM    comment []

© Copyright 2005 Paresh Suthar.



Click here to visit the Radio UserLand website.
 


July 2002
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jun   Aug