Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010: How Can I remap F2 to Rename File rather than Open Object Browser

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?

like image 391
Gordon Bell Avatar asked Jul 30 '10 21:07

Gordon Bell


People also ask

How do I rename a file in Visual Basic?

Use the RenameFile method of the My. Computer. FileSystem object to rename a file by supplying the current location, file name, and the new file name. This method cannot be used to move a file; use the MoveFile method to move and rename the file.


1 Answers

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
like image 94
JaredPar Avatar answered Nov 16 '22 02:11

JaredPar