Change keymap in Resharper? - visual-studio

I've applied the default (IntellJ IDEA) keymap to the Visual Studion and want to change some mapping to my custom, for example Generate Code (Alt+Ins) . How can I to do it or it is impossible .
P.S.Visual Studio 2010, Resharper 6.1

Go to Tools -> Options -> Environment -> Keyboard and find the relevant ReSharper shortcut in the list (I think the one you mentioned is called ReSharper.ReSharper_Generate).
Put your cursor in the Press shortcut keys box, press then shortcut combination you want to use for it, and then press the Assign button. You should now be able to use your new shortcut to access the command you chose.

Menu - ReSharper > Options... > Environment > Visual Studio Integration > Kayboard Shortcuts - you can choose VS

Related

How to collapse/expand only regions by keyboard shortcut in Visual Studio 2017?

I've found Quick Launch has CollapseRegions and ExpandRegions which functionality is actually what I need.
But I would like it to be toggled by key in like Ctrl+M,J instead of using Quick Launch like Ctrl+Q > CollapseRegions > Enter.
Is there any way to do that?
In Visual Studio 2017 :
Go to Options -> Text Editor -> C# -> Advance -> activate 'Collapse #regions when collapsing to definitions'
Explicitly to collapse all using Ctrl+M+O and for expand use Ctrl+M+X.

Visual Studio 2015: Disable Control+Click Navigation

After upgrading to Visual Studio 2015, holding control while clicking on a symbol navigates to that symbol definition. In prior versions, this would instead select the entire word.
How can I disable the navigation event when CTRL + Click(ing) a symbol, so that it highlights the word?
I do have Resharper (Ultimate 9.2) installed. The configuration option under Environment -> Search & Navigation -> Go to Declaration on Control + Click in the editor is not checked.
All the search engine results make mention of this being a feature of the Productivity Power Tools extensions in previous versions of Visual Studio. I do not have that extension installed.
I found my solution in the "Options - Text Editor - General" settings. This was on VS 2017 thou.
To disable navigation to symbol definitions in VS2015,
this one worked for me.
With Resharper Ultimate 2016.3.1, I could fix the issue by disabling "Rich mouse navigation in the editor". It can be found in Resharper Options window, under Environment > Search & Navigation.
Maybe updating Resharper could solve the issue.
Also, Productivity Power Tools is not installed on my machine.
In vs 2017 this setting is available in Tools -> Options -> Text Editor -> General -> Enable mouse click to perform Go to Definition.
You can uncheck it!
Go to ReSharper Options > Environment > Search & Navigation, then uncheck the following options:
Rich mouse navigation in the editor
Enable 'Smart go to declaration'
I finally solved it following the info I found on this page..
edit
Ensure you are using Visual Studio as your resharper keyboard scheme.
Environment -> Keyboard & Menus
Tools -> Options -> Environment -> Keyboard
To stop the go to declaration, select it and input a new key short cut for it. In this image I have demonstrated that I changed this short cut to ctr num 1 and could not change it to ctr num 3. On testing crt click does not no take me to the declaration.
Find the shortcut you want to remove, in this case Edit.NavigateTo and remove.
An update for Productivity Power Tools + VS2017. Instead of having settings for this feature, a separate plugin gets installed. So after installing PPTs, you'll have a new extension called Ctrl+Click Go To Definition. Not sure why we need that tool considering it's baked into VS, but...
Anyway, Disabling that extension (plus the other things mentioned in other comments for VS and Resharper) fixed my ctrl+click woes.
To switch to the Visual C# keyboard mapping scheme
On the Tools menu, click Options.
Expand Environment, and then click Keyboard.
Select Visual C# 2005 from the Apply the following application
keyboard mapping scheme drop-down list.
or you can do
Keyboard: CTRL + W
also plugin can be used
Keyboard Shortcut Exporter
you can import/export keymapping file

Visual Studio: Shortcut Info

for some/most of the functions in Visual Studio there do exist shortcuts. Sadly it's hard to find them.
I'm looking for a addin/tool that will display me information for a shortcut.
For example:
I comment a line with // and the tools gives me information that the shortcut for this is STRG + K, C.
I press some button, let's say debug and it shows me that the shortcut would be F5
For offline use there's the posters with key bindings, but inside VS I'd recommend the IntelliCommand extension which will show you key combinations when you press ctrl (+ some other key).
No other addin/tool required. In Visual Studio, under Tools > Options > Environment > Keyboard, you can find all available shortcuts.

ReSharper key bindings problem

I use: Visual Studio 2010 Ultimate, Resharer 6.
In ReSharper's options i choose Visual Studio keyboard sheme and click Apply Sheme:
After that some shortcuts are not assigned, such as: Go to Declaration, Go to implementation, Find Usages, Complete symbol, etc:
Try
Tools -> Options, Environment -> Keyboard -> Reset
Import and Export Settings, re-import C# developer settings
devenv /reset
Nothing helped.
Configure shortcuts manually is not desirable.
Help, please.
This one worked for me 100% after trying a bunch of other things:
Go to Tools -> Options -> Environment -> Keyboard -> Press the (RESET) button
Go to ReSharper - > Options -> Keyboard & Menus -> Select the "Visual Studio" scheme -> Press "Apply Scheme"
Press "Save"
Press "CTRL-T". Since this shortcut is mapped in both VS and Resharper, you will be presented with the "Shortcut Conflict"-window. Here you select "Use ReSharper (Ultimate) command" and make sure to check the box "Apply to all ReSharper (Ultimate) shortscuts".
Voila!
This is a known issue that affects all ReSharper shortcuts that include F12 after switching from IntelliJ keymap to VS keymap. It's documented in this bug report that you're free to watch and vote for.
As far as I'm aware, the only workaround would be to reassign the broken shortcuts manually through Tools > Options > Keyboard.
Hpersw's solution works. in VS -> Tools -> Import & Export Settings -> Reset all settings and press finish. This should give you the shortcuts back
After wrestling with this for half a day and trying all of the options above, I finally found the magic setting that fixed MY problems: I UNSELECTED "Hide overriden Visual Studio Items" in Options/Keyboard and Menus"
In VS go to Tools -> Options -> Environment -> Keyboard -> Apply the following keyboard mapping schema: [Default]
The easiest way to solve this problem is :
Go to: ReSharper -> Manage Options -> Reset All Settings
These steps gonna solve your shortcuts (key bindings) issues.
You do not have to keep performing the following actions:
1) Go to Tools -> Options -> Environment -> Keyboard -> Press the (RESET) button
2) Go to ReSharper - > Options -> Keyboard & Menus -> Select the "Visual Studio" scheme -> Press "Apply Scheme"
I know this is a little old, but I just thought I'd share my epiphany... It seems that with Resharper 7x and VS2010 (probably anything later too), is best set when you op for the selecting the "Text Editor" as the settings to update under Options->KeyBoard. So, what I would recommend if you like some of Resharper features, use this site to get the shortcuts Resharper Shortcuts
Then set them accordingly with Text Editor selected as the settings to update. Global does NOT seem to work consistently.
FYI- Text Editor works for C#, CSS and javascript. Not sure about other languages within VS.
Taken from the documentation on Configuring Keyboard Shortcuts:
To switch between two available keyboard schemes or restore the default state of your currently selected scheme
On the main menu, choose ReSharper | Options.
Select Environment | Visual Studio Integration.
In the Visual Studio Integration tab, select Visual Studio, ReSharper 2.x or IntelliJ IDEA, or None, and click Apply Scheme. If you selected None, you can define an arbitrary set of custom keyboard shortcuts in Visual Studio's native Options menu (Tools | Options | Environment | Keyboard) - see To configure keyboard shortcuts above.
Also, here's some documentation on how to resolve keyboard shortcut conflicts with Resharper
Doing "Reset All Settings" in VS Import&Export usually helps with restoring shortcuts. But it will, eh, reset all VS settings.

How does one set Visual Studio 2010 keyboard shortcuts comfortably, especially when using ReSharper?

In every Visual Studio.NET version you can set keyboard shortcuts using menu Tools -> Options -> Environment -> Keyboard and then find the command you want to assign a shortcut to by entering part of it in "Show commands containing".
For one thing, the listbox is ridiculously short and hard to navigate - is there an alternative?
Then, how do I find out the correct command name for a specific action?
Specifically, I'm using ReSharper 5.1 with Visual Studio 2010 and want to have the Alt + Enter shortcut back (it used to be there in older versions by default) that opens the ReSharper context menu when the cursor is over a curly underline ReSharper uses to highlight errors or warnings.
How do I find out the command name for that (except by an educated guess)?
The way I do this is to perform an action while recording a macro (using Tools / Macro / Record temporary macro).
When I have finished with the action, I look at the source code of the macro and it usually helps to find the correct command.
For example, I have just let R# add some magic through Alt-Enter, and the macro recorder has:
DTE.ExecuteCommand("ReSharper_QuickFix")
You can rebind all of the ReSharper shortcuts by using the ReSharper -> Options -> Visual Studio Integration page. Select a keyboard scheme and hit "Apply Scheme".

Resources