Open Containing Hotkey in Visual Studio 2012

In versions of Visual Studio until 2012, I was able to create a hotkey to execute the "Open Contains Folder" for the currently active text file. I accomplished this by creating a macro that was assigned a keystroke.

Visual Studio 2012 has no macros. How could I do the above in this version?

+6
source share
2 answers

Unfortunately, now you will need to download the VSSDK and create a VSPackage to do this, now that the macros have been removed from the IDE.

The immediate macro task is now a PowerShell script , which you can run from the console, but I don’t know how to assign keyboard shortcuts.

Running PS outside of the IDE is an option (using the External Tool command with a customized keyboard shortcut), but getting EnvDTE outside the process can be difficult.

EDIT: There is a much simpler solution. I can not believe that I did not understand this for a start!

Just go to Tools ... Options ... Environment ... Keyboard, find File.OpenContainingFolder and assign a shortcut. This command will open the active document containing the folder.

+10
source

I found a key combination for Open containing folder : Alt + - + O

When you press Alt + - , it will open Tab Context Menu Then you will see that the shortcut key for the O pen contains the O folder, then you should press O.

Menu

+2
source

Source: https://habr.com/ru/post/925861/


All Articles