views:

534

answers:

4

In Visual Studio, when you rename a variable name in its definition, there's a little underline in the last letter so if you hover that, you'll get the option "Rename OldVaribleName to NewVariableName" and so rename all entries in that procedure of that variable.

Is there a shortcut for that and not use the mouse?

+3  A: 

These are known as Smart Tags. You can use Shift+Alt+F10. CTRL+. works too.

Ahmad Mageed
@bdukes: thanks for the edit :)
Ahmad Mageed
A: 

I think the default is CTRL + .

Brandon
A: 

If you like, I would suggest that you try ReSharper, it provides a lot of functionality for refactoring your code.

In ReSharper to rename a variable or function, simply use the shortcut CTRL+R, R.

(I know it may not be an answer to your question, but I think if you like using keyboard shortcuts that you will enjoy ReSharper).

Nordes
Or CodeRush/Refactor! Pro :)
Ahmad Mageed
+2  A: 

In VS 2008 using C# you can just hit F2, not sure about other versions/languages, though. That also renames files in Windows Explorer if you're too lazy to right-click like I am.

Brett