views:

12

answers:

2

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.

+1  A: 

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
Sandy
+1  A: 

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.

XIII