17

As the question title says: Is there a Visual Studio keyboard shortcut (or series of shortcuts) to rename file in Solution Explorer?

I am using VS2008 and manually doing this by right-clicking on a file in the Solution Explorer and selecting 'Rename', but this is a pain in the behind.

Dhaust
  • 5,470
  • 9
  • 54
  • 80
  • In general, you can customize the keyboard shortvuts to whatever you like. However, also check out this answer http://stackoverflow.com/questions/3375444/visual-studio-2010-how-can-i-remap-f2-to-rename-file-rather-than-open-object-bro – Jagmag Nov 10 '10 at 03:55
  • @InSane. Thanks for the link. Yet another example of how suckful the SO onsite searching is. That link didn't come up in the Ask Question related answer prompt. – Dhaust Nov 10 '10 at 04:09

3 Answers3

24

Depends on your settings profile:

In the C# profile, F2 does this.

you can assign a shortcut to any key:

  • Tools -> Options, Expand Environment and select Keyboard
  • Enter File.Rename into the text box
  • Put the Focus on the "Press Shortcut keys" box and hit 'the key you want to assign'
  • Click Assign
Jasper
  • 2,166
  • 4
  • 30
  • 50
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
1

No use option Refractor.Rename and Assign key to that say F2

0

Use: File Utils Extension

command T or control T >File Utils: Rename, that's it.

MTraveller
  • 31
  • 2