Tomas
Tomas

Reputation: 18097

Move between variables using keyboard shortcuts

Is it possible to move quickly from one place in code to another where variable is used? For example I have variable String strResponse and it used in several places in code. I want to get from one place where variable used to another quickly using keyboard shortcuts. Is it possible?

VS has "Find all references" option but that's not what I am looking.

Upvotes: 2

Views: 191

Answers (2)

Sandeep Kumar M
Sandeep Kumar M

Reputation: 3851

Use bookmarks

Bookmark all variable occurrence then use following shortcut keys to navigate between bookmarks

  • Select variable

  • Ctrl + F & select "Bookmark All"

  • Then use

  • Ctrl + K, Ctrl + P - previous bookmark

  • Ctrl + K, Ctrl + N - next bookmark

Upvotes: 1

Kris van der Mast
Kris van der Mast

Reputation: 16613

Visual Studio 2010 has something like this out of the box: Highlighted references. But since you're using Visual Studio 2008 you're out of luck when it boils down to default stuff. However you can install Resharper which has something similar: shift+alt+F11.

Upvotes: 1

Related Questions