Summary : In this blog post I described a small tips on how we can use “ Open Containing Folder” features using shortcut key or from Context Menu.
VISUAL STUDIO HOTKEYS AND TRICKS CODE
Ow you can right click on code editor and select ” Open Containing Folder” to open the current opened files in Windows Explorer. As you have already followed the first process you do not need to add the keyboard shortcut any more it will take the same. ” button to give the shortcut keys from here. Here you can use Move UP / Move Down to move the position of your command in context menu. You will find “ Open Containing Folder” has been added in Customize Window’s Commands Tab. Once you clicked on “ Add Command” below screen will appearįrom the above window select “ File” from left “ Categories” list and “ Open Containing Folder” from “ Commands” list. Then Click on Add Command ( Step 1 ,2, 3 as shown in image ) In Customize window, Move to the “ Commands” Tab then select “ Context Menu” option Button and “ Editor Context Menus | Code Window” From the drop down list. Add “Open Containing Folder” in Context Menu :įor this features you also need to use the same command ( File.OpenContainingFolder) but the process is bit different. You are done ! Now from any open items in VS Studio if you press the shortcut key ( For me Ctrl + Shift + Q), corresponding item will be open in windows explorer. Once you have the key, Click on “ Assign” and OK. You can assign a shortcut to a Label control, in such a case next tab-ordered control will be activated. For example, once you have &Edit, you can have E&xit buttons with Alt+E and Alt+X shortcuts respectively. Here you may need to spend few time find out the unique shortcut key with some trial hit ( I have set as Ctrl + Shift + Q). Assigning the same shortcuts to several controls is ambiguous, but you can use any letter in the label to be a shortcut. Once you the command “ File.OpenContainingFolder” assign a shortcut key for the same. Using the Run Execution to here button: Hover the mouse on the beginning of the line where you want to stop the debugger, this will display the Run Execution to here button, click on it, and done. Now, if you know the command you can directly scroll down the command list or Type few of the characters in the search text. Using Ctrl + F10 shortcut: Go to the line where you want to stop the debugger and press Ctrl + F10. Navigate as VS IDE Menu > Tools > Options > Environment > Keyboard. For “ Open Containing Folder” Command name is “ File.OpenContainingFolder”. Before assign to shortcut to any of the command you should know the name of the command too. This process is same for most the cases when you want to assign some key word shortcut for any of the Visual Studio Command. Add Shortcut For Open Containing Folder : Though we can do it from the default process ( without shortcut ) but this will really save some amounts of your time, and time is money ?. This will be really helpful for you to work with “Open Containing Folder”. But do you know we can assign keyboard shortcut for the same or even we can customize the context menu in code editor to achieve the same as shown in below images. This operation by default having no keyboard shortcut. This will open the selected item location in windows explorer. How did we do that ? Yes it’s very simple, Just right click on file from files Tab and select “ Open Containing Folder” from the context menu as shown in below. “ Open Containing Folder” is one of the frequent used functionality to open a particular file location in windows explore from Visual Studio IDE. you are done.įrom next time you just need to press “ Ctrl+Shift+W” to remove unused namespaces and sort them accordingly.Įven you can set the same for “Sort Usings” ( “Edit.SortUsings” ) and “Removed Unused Usings” (“ Edit.RemoveUsings”). Search for “ Edit.RemoveAndSort” which command will to both remove unused usings and sort the usings, then set shortcut for the same, as I did with “ Ctrl + Shift + W”, Click on “ Assign” and Ok. From Tools > Option, navigate to Keyboard tab. But it can be even very handy with in visual studio aswell, if we can set some shortcut key for them. Let’s see how we can make it more handy !Įven we can automatically fix this using some third party tools and addins. Either you can Remove Unused Usings, Sort Usings or we can do it together by selecting “ Remove and Sort”.
There you have three different option for “ Organize Using”. We can do it easily from the context menu of the code editor.
While dealing with maintaining coding standard like stylecop warning fix with code, most of the time we need to remove unused namespaces and sort the namespaces.