Skip to content

Tip 5.2: How to search from the Command Window

August 8, 2013

Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

Almost all Visual Studio commands can be run via the Command Window, scope willing. The next screen shot shows what the UI looks like when you type in the Edit.Find command via the Command Window.

Here are the additional Command Window options:

  • >Edit.Find /options Shows which options are currently set
  • >Edit.Find /reset Clears all options

Examples of such commands include the following:

  • >Edit.Find MainForm /case /proc This is a Quick Find command that matches case in the current procedure.
  • >Edit.Find MainForm /o /w /m /u /h This is a Quick Find command that opens documents, matches a whole word, marks matches, searches up, and searches hidden regions, respectively.
  • >Edit.Replace Class1 Class2 /doc /all This is a Quick Replace command that replaces all occurrences of Class1 with Class2 in the current document.
  • >Edit.FindInFiles Program /lookin:”c:\Users\nils-holger\Documents\Visual Studio 2008\Projects” /ext:*.cs /text2 This is a Find In Files command that looks in the Projects folder for files with the .cs extension and shows results in the Find Results 2 window.

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: