What’s new in Visual Studio 2010 IDE – Code Editing, Searching & Navigating


Zoom

In any code editing window or text editing window, you can quickly zoom in or out by pressing and holding the CTRL key and moving the scroll wheel on the mouse. Or click the dropdown at the lower left hand corner.

image

Generate From Usage

The Generate From Usage feature enables you to use classes and members before you define them. You can generate a stub for any class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code. This minimizes interruption to your workflow.

Generate From Usage supports programming styles such as test-driven development. Press CTRL+ . to display the Smart Tag, and the appropriate options appear.

Also check out this video:

image

Call Hierarchy 

CTRL+ALT+K Call Hierarchy (available only in C#) enables you to navigate through your code by displaying all calls to and from a selected method, property, or constructor. This enables you to better understand how code flows and to evaluate the effects of changes to code. You can examine several levels of code to view complex chains of method calls and additional entry points to the code, which enables you to explore all possible execution paths.

Call Hierarchy is available at design time, unlike the call stack that is displayed by the debugger.

image

Navigate To

Ctrl + comma, new for Visual Studio 2010, is a powerful way to search, especially when you’re not sure exactly what you’re looking for. It helps you locate items in your code by using "fuzzy" search capabilities. For example, if you type Foo Bar instead of FooBar, Navigate To will still return useful results. It’s a smart, incremental search that refines as you type and will find any symbols (e.g. file, type, and member names) matching your search terms.

image

Highlight References?

When you click a symbol in the source code, all instances of that symbol are automatically highlighted in the document. To navigate between references by using the keyboard, press CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW.

Box Selection

VS 2010 adds the following new capabilities to the box selection feature:

  • Text insertion: Type into a box selection to insert the new text on every selected line.

  • Paste: Paste the contents of one box selection into another.

  • Zero-length boxes: Make a vertical selection zero characters wide to create a multi-line insertion point for new or copied text.

Multi-Monitor Support

You can drag the document/property windows outside the IDE to any location you want. To return the window to its most recent docked location, hold down the Ctrl key and double-click the title bar of the window.

Other code searching and navigating in Visual Studio 200X:

Quick Find (Ctrl+F), Find in Files (Ctrl+Shift+F), Incremental Search (Ctrl+I), Go To Definition (F12), Find Symbol (Shift+F12), Navigate Backward (Ctrl+minus) and Navigate Forward (Ctrl+Shift+minus)

Advertisements

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