views:

66

answers:

2

In Visual Studio 2010 Solution Explorer tree view, how can I remap the F2 key to Rename the Selected File rather than open Object Browser?

A: 

I don't know about you, but in my copy of VS2010, F2 in the Solution Explorer DOES rename the file. What exactly do you have selected when you hit F2?

djacobson
The OP likely selected the Visual Basic profile which maps F2 to object browser.
JaredPar
It opens the Object Browser for me, Visual Studio 2010 Ultimate.
Gordon Bell
Hmm, then how do I change the profile?
Gordon Bell
Jared, you're probably right - my keyboard mapping was set to Vis C# 2005 mode. Was just about to edit my answer to provide actual content, but you beat me to it. +1
djacobson
See Jared's answer to this question, Gordon. :)
djacobson
+2  A: 

Do the following

  • Tools -> Options
  • Expand Environment and select Keyboard
  • Type "File.Rename" into the text box
  • Put the Focus on the "Press Shortcut keys" box and hit F2
  • Click Assign
JaredPar