25

I'm using Resharper keyboard shortcuts all the time and it helps a lot in everyday development.

But i constantly need to create new folders in my Visual Studio projects so this means -> move the mouse from keyboard, use the mouse, right-click the desired project, choose menu Add->New Folder, type folder name etc.

It's tedious!

Is there ANY way to do this via keyboard shortcut - to press keyboard combination, that will at once create folder in current project, and place cursor into TextBox to enter folder name and slam that Enter key and then continue?

5 Answers 5

51

You can add a shortcut by yourself. ToolsOptionsEnvironmentKeyboard → select Project.NewFolder and assign a shortcut.

4
  • 1
    This works on my machine but with a caveat. You STILL have to use your mouse and click the project name under which you want to create folders under. So what I did was I would open up Solution Explorer thru ctrl+alt+L, move the focus to the project name using keyboard and create a new folder with a new shortcut created thru this answer.
    – dance2die
    Jul 11, 2009 at 14:37
  • 2
    Works but only if you first use Ctrl-Alt-L to get to Solution Explorer then you can move trough the projects and choose where to create new folder, and then issue your shortcut. Im using Ctrl-Alt-C. Thanks
    – Roboblob
    Jul 11, 2009 at 15:41
  • 1
    @Sung I don't consider this a caveat, how else will Visual Studio know in what project and in what folder to make the sub-folder? May 15, 2013 at 19:50
  • @leetNightshade, the current one, just like Ctrl-Shift-Ins creates your new item in the current folder. Even better would be two commands, one to add a new folder under the current folder, and another to create a new folder beside the current folder. Or a set of shortcut commands to quickly traverse the folder structure... EDIT: Wow. 9 years later and there still doesn't seem to be a good, quick way to do this.
    – Toby
    Aug 9, 2018 at 16:48
26

Alt, v, p to activate solution explorer.

Use the arrow keys to select the project to which you want to add the folder.

Alt, p, d to create the new folder

1
  • awesome, but instead using Alt+V+P try Ctrl+Alt+L because there may be another window shortcut with P like Pending changes. Apr 26, 2014 at 8:23
15

Activate Solution Explorer (Ctrl + Alt + L) or Sync to Solution Explorer (Alt + Shift + L), then hit Alt + Ins (ReSharper Generate command).

1
  • 1
    Yes this is better solution, but only if you use Resharper.
    – Roboblob
    Jul 15, 2009 at 12:14
0

I don't think that there isn't one for folders like there is for everything else.

http://msdn.microsoft.com/en-us/library/xte2hh6a(VS.71).aspx#vxurfvisualstudio70globalshortcutkeysanchor1 has all the shortcuts for visual studio. There are shortcuts for adding new items just doesn't look like folders.

0

I realize this is an old question, but I still feel your pain, and the solutions suggested here all require a lot of key-pressing (arrow keys, specifically; tedious, especially in a large solution).

The alternative that I have adopted: add a button to my main toolbar, and position it as close to the Solution Explorer as possible*. Now, with the mouse I can quickly select the Project then press the "New Folder" button. For me, this is easier than navigating through the context menu.

Instructions: From the little down-arrow at the left-end of the toolbar: Add or Remove ButtonsCustomizeAdd CommandProject ▶ "New Folder"

*theoretically, the button could be added to the Solution Explorer toolbar itself. But this requires building a VSIX extensability project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.