I am used to create new files in Visual Studio/Resharper with AltREN and then C for class, S for struct, T for test etc.
(this is the same as the menu Resharper/Edit/New From template)
The last step stopped working when I updated to Resharper 9.
Is there a way to restore the old behaviour or is there a new shortcut available.
I tried to rename the template &Class but it didn't help.
In Visual Studio with ReSharper 9.0+:
Tools > Options > (Sidebar) Environment > Keyboard
Then:
Show commands containing:
resharper.resharper_template
These are the templates listed in the New from Template dynamic menu. By default, Class is the first template in this list (Template00). To assign a shortcut key to the first template in the list:
In this location, highlight ReSharper.ReSharper_Template00.
Choose an option under Use new shortcut in: (I chose Solution Explorer).
Use the Press shortcut keys: to assign a shortcut key combination and click Assign to save it.
in 2017 version
use the Ctrl+Alt+Insert keyboard shortcut -> choose class -> to insert a class
ref: https://www.jetbrains.com/help/resharper/2017.1/Templates__Applying_Templates__Creating_Files_from_Templates.html
Related
How to remove all existing hooks for a given shortcut?
For example on image bellow I want only Ctrl+Alt+S to open up Options but that key combination is also hooked to other things. I want to disconnect everything else and leave it only for Options. How do I do that?
Its because your custom shortcut set as Global and VS will override it when there is exist specificly assignment for that key combination..
All you need to do remove existing binding, to do that;
Go to Tools => Options => Environemnt => Keyboard
Select your command;
Set your shortcut key and click 'Assing'. You will see a selectbox that titled "Shortcut currently used by"
Go to that existing binding, select it and click remove
and enjoy your custom binding.
See pic below;
I used to used the shortcut Ctrl + Shift + C to add a new class in Visual Studio 2015. This seems to have gone away when I'm using a different machine. How do I set this?
I've looked in Options > Environment > Keyboard but I can't see anything obvious...
Navigate to Tools >> Options >> Environment >> Keyboard, search for commands containing Project.AddClass and setup the shortcut you want
Steps to setup a shortcut
Search any command like AddClass in Show commands containing box
Select a desired command
Click on the blank Press shortcut keys box
Press desired key / key combination for shortcut using your keyboard
Also, see article Visual Studio Shortcuts and Add on Tools...
This article explains the same in more detail with some other interesting (and perhaps even relevant) points.
I was wondering if there is a set of keyboard shortcuts to create/reorder/rename properties or entities in the EDMX designer of VS 2013?
Do you know of any? Is there a way to make them? I hate using the mouse when I can do the same with keyboard.
Yes. Although the context menu does not show it, you can use
F2 = Rename property
Select a property and then hit Enter to add new properties.
PS: My keyboard was mapped to Visual C# 2005 mapping scheme.
In addition you can add keyboard shortcuts to a lot of the actions you can take. To do this
Select `Tools > Options > Environment > Keyboard'.
Enter Entity in the Show commands containing:
Select the command you want from the list.
Select ADO.NET Entity Data Model Design in the Use New shortcut in:
Select your shortcut key.
The shortcut to Build a solution in Visual Studio 2008 is Ctrl + Shift + B.
I would like to know the default shortcut to Rebuild the solution.
The command Build.RebuildSolution is not bound to any key combination in the standard profiles. However you can use the following trick to invoke it
Alt + B, R
This will navigate to the build menu via Alt + B and then R will select the Rebuild option
Another way is to do this:
Tools >> Options >> Environment >> Keyboard.
Locate the textbox decorated by the 'Show commands Containing' lable.
Type >> 'Build.Rebuild'
Select >> the rebuild type you want, you have two options to choose from.
Locate the textbox decorated by the 'Press shortcut Keys' lable.
Hit >> 'a key on your keyboard', i.e I used F6 for solution wide rebuild.
Click >> the assign button.
CLick >> O.K and to exit.
Finally load up a test project to test out the short cut.
In my installation, there is no default. I am configured for C#, it's possible other configurations will define this by default, but I don't think so. You can see if there is a key assigned by going to Tools -> Customize, clicking the Keyboard... button at the bottom and typing "Build.RebuildSolution" in the Show Commands Containing edit box. If there is a key assigned, it will show up at the bottom of the dialog.
There is no default shortcut to Rebuild Solution.
In addition to the ways mentioned in other answers you can perform the rebuild by
Create a Visual Studio Macro that rebuilds the solution and assign a keyboard shortcut to macro. The advantage of this approach is that you are no longer restricted by the commands provided in visual studio. You can create a custom operation like rebuild the solution, launch the application process and attach the visual studio debugger to the process. All this in a single keyboard shortcut!
In Visual Studio there is a drop down list in the top right hand corner that you can use to navigate to the various members in the class. Does anyone know if there is a hot key to open this ddl?
I think you're looking for Ctrl + F2, which moves the cursor to the navigation bar at the top of a code view. From there, you can press Tab to move the cursor over to the member list.
For this (and pretty much every other Visual Studio hotkey/shortcut key combination), see here.
Visual Studio 2017+: They now support Resharper-like shortcuts. They work pretty well, too.
Ctrl+T - 'Go to All' (class/member/file), type m MyProp for members only
Alt+\ - 'Go to Member in current file'
Using VS 2008, I still don't know how to get directly to the Members dropdown which is what I want. But, the key bindings will be different for everyone. The command you want to search for under Options > Keyboard > Show commands containing: is Window.MoveToNavigationBar.
Assuming you are using the default keybindings packaged with Visual Studio, CTRL+F2 will focus the top-right drop-down list, and you can then navigate members by pressing TAB and using the arrow keys.
In my install of VS 2013, this is called Window.MoveToNaviationBar and is bound to Ctrl+F8. This is visual C++ settings.
Use Ctrl + F2 to get up there, then a click on Tab will get you to the member list instead of the object list.