Resharper's settings often reset spontaneusly - resharper

Resharper's settings often reset spontaneously. This happens almost always after Visual Studio has been restarted, but I don't found exact regularity.
This continually repeats on every Visual Studio on every machine I am work.
This is corrected by pressing "Apply Scheme" inside "Resharper options -> Keyboard & Menus".
But why is this happening and how to prevent it from happening again?

In case you have a non-English keyboard language installed on a machine, you may probably experience this issue https://youtrack.jetbrains.com/issue/RSRP-449737. Visual Studio can forget custom shortcuts if you change keyboard languages between launching/closing Visual Studio instances.
You may try reproducing the same issue on any custom shortcuts as described in ticket's comment:
Suspend ReSharper. Restart VS.
English is an input language. Assign shortcut "Ctrl+/" to the Edit.NavigateTo command using Tools | Options | Keyboard (see 1.png)
Restart VS. Shortcut is assigned (see 2.png)
Close VS. Switch to a non-English input language. Start VS. The shortcut becomes "Ctrl+\" (see 3.png and 4.png)
Close VS. Your language is still an input language. Start VS. Shortcut is lost (see 5.png and 6.png). It's 100% reproducible for Russian. You can use any VS command instead Edit.NavigateTo, it does not matter. May be you can try to apply the shortcut in French and then switch to English.

Related

Forward slash key not working in VS2019 code editor

Since a few days (I don't know exactly when it started) the forward key in VS2019 is not working in the code editor. No matter how many times I press it, it doesn't do anything.
It also doesn't work in the seach box in the menu bar (labelled 'Search (Ctrl+Q)') nor in the search box which appears with Ctrl+F.
It does work in other places, like the solution explorer search box (Ctrl+;) and in the resource editor.
The forward slash is working in any other application that I tried (including Visual Studio Code and MS Excel). The question mark (Shift+/) is working everywhere, including in the code editor window. Even AltGr+/ is working (producing the Spanish upside down question mark).
I tried all other keys, including the AltGr combinations. They all work fine. Keyboard layout is US International.
The foward slash key doesn't work in the code editor when typing it on the laptop keyboard, and doesn't work when typing it on an external keyboard, or via an RDP session.
I am running Windows 10 Pro 64-bit, version 20H2, build 19042.685. System is up to date.
Visual Studio Professional 2019, 16.8.3, also up to date.
What is causing the forward slash key to fail?
How can I solve this problem?
(Too long for a comment.)
The OP indicated that the problem was resolved after resetting the keyboard shortcuts, which suggests that / was set as a keyboard shortcut either by accident or perhaps by an installed extension.
However, the question remains in such cases of how to identify what a particular keyboard shortcut is assigned to, in order to turn off just that one shortcut as opposed to resetting all.
Visual Studio does not appear to provide a place to see the list of all active keyboard shortcuts. An alternative is to go to Tools / Import and Export Settings / Export Selected / All Settings and save a .vssettings file with all the current settings. That is a plain text file with extended XML sections, and the keyboard shortcuts can be found under the following node (reformatted for readability):
<Category name="Environment_KeyBindings" ... >
<Version>16.0.0.0</Version>
<KeyboardShortcuts>
<DefaultShortcuts>
<Shortcut Command="View.ViewCode" Scope="Global">F7</Shortcut>
...
</DefaultShortcuts>
<UserShortcuts>
...
</UserShortcuts>
</KeyboardShortcuts>
</Category>
One of the <Shortcut> lines would have been listing / before the reset, and the Command attribute on that line indicated the assignment, so that it could be located and turned off individually in Tools / Options / Environment / Keyboard.
#dxiv Your comment made me check the shortcuts. Tedious job, scrolling through those hundreds of options). Nothing. Then I clicked the Reset button. That solved the problem.
In my case, the CodeRush extension was the guilty party. "Selection comment" gets set to use / upon installation. WTG DevExpress ......
https://docs.devexpress.com/CodeRushForRoslyn/120205/coding-assistance/selection-tools/comment-uncomment-selection
Update:
Also adding a screenshot of it in VS 2022 to help people find it:

Can't activate shortcut on intellij products

Description
I'm using some intellij products (WebStorm, PHPStorm) and Android Studio and have the same issue with both of theses.
I have an azerty keyboard, with a french layout.
I can type without issue in these softs, but I can't activate shortcuts.
When I try to activate a shortcut (e.g ctrl+z), the activated shortcut is ctrl+w.
the shortcut is correctly triggered, but with the wrong keyboard layout. It seems that when I type, my french keyboard is used, but when I want to use a shortcut, the english layout seems to be used.
Is this a known bug (if so, I've not found any mentions about it), or did I miss something?
What I've tried
I'm running on Fedora 29, with Gnome 3.
I've tried to see if it wasn't reproductible with others softs (e.g firefox/ vscode), and I can't reproduce this.
I've tried to see if it wasn't based on my keyboard settings, so I ran xev to monitor the output of pressed keys. I can't reproduce this issue.
In intellij settings, I've tried to set Keymap > Prefer key position over key char with national layout both true and false, it doesn't seem to change anything.
Current situation
Here is an exemple of a shortcut definition in Android Studio.
I pressed A to Y keys on my french keyboard (which output A,Z,E,R,T,Y), and then press the same keys with ctrl (which output ctrl+Q instead of ctrl+A and so on)
https://imgur.com/a/U4aFd7F
Expected situation (tl;dr)
I expect that when I press ctrl+a, the shortcut triggered inside intellij products is ctrl+a instead of ctrl+q
It is indeed a known bug: https://youtrack.jetbrains.com/issue/IDEA-165950
In the bug report another workaround is mentioned for Gnome 3:
Re-order the languages in Settings > Language and Region tab, put English(US) first of the input source list.
I solved it by running setxkbmap fr. I don't know why this is required by intellij products, but it works.

VS Code keyboard layout change

I am using Visual Studio Code with English keyboard layout switched in Windows when programming, but when I am using my computer for general use I use Slovak keyboard layout. Sometimes it can get ridiculous when I switch from one to another multiple times in one minute. Is there a setting (or a plugin) that could set the keyboard layout in VS Code to English while Windows layout is still set to Slovak?
I will summarize for you the solution to this, hope it is still helpful for you or any other looking for this answer:
you have to press Ctrl+Alt+P
then in the display that will appear at the top, write the language you want in case it does not appear
once this is done, VSC will ask you to restart.
once restarted is done it should be fine.
It is the way to do it without changing windows configuration as you will see in ther similar posts.
Hope it helps

Dyalog APL - Disabling APL symbol input

I recently obtained a personal licence for Dyalog APL and started using it (I'm switching over from APLX). I really like it, but whenever I'm not using the IDE, the APL symbol keybindings persist. For example, if I try to undo something in another application by hitting CTRL-Z, I'll instead get ⊂ and the undo will not go through. Similarly, attempting to use CTRL-S to save a document will result in me typing ⌈ instead of saving. The only way I've been able to resolve this is by restarting my computer.
How can I disable APL symbol input after the IDE is either not in focus or has been closed? If there's no way to do that, is it possible to map the symbol shortcut to ALT instead of CTRL? ALT is used far less often than CTRL for shortcuts, so I could live with that.
I'm using Windows 8.1 64 bit and the 64 bit version of Dyalog APL with a US keyboard.
If you want to use AltGr (right side Alt) to enter APL symbols while keeping a normal US layout or an almost normal UK layout, you can use my keyboard layout instead of the IDE. This avoids almost all clashes with other applications, so you can keep the keyboard active at all times and forget about mode switching.
Dyalog uses a standard Windows mechanism called "IME" (Input Method Editor) to enable input of APL-Characters. The advantage is that this enables you to use APL-Symbols anywhere - but obviously there is a 2nd side to that.
The "challenge" in your setup is only to change the IME back from APL to regular text-mode and this does not need a reboot. Pls check this article for more info on IME: https://www.google.de/amp/www.thewindowsclub.com/input-method-editors-windows/amp
(Sorry, I'm using W10, so I rather refer you to that article than giving wrong info... BTW, the advantage of W10 is that the IME will be default work in application-mode, so you can go to WinWord there and use default hotkeys w/o switching IME.)
Edit: For those using W10 (and probably W11) that article is out of date. The Languages settings are no longer in the Control Panel and are now in Settings. Go to Time and Language>Keyboard>"Input language hot keys" and change the Key sequence for "Between input languages". The "Switch Keyboard Layout" shortcut will be the one that toggles between keyboard layouts (I have Shift+LeftAlt toggling between Dyalog and US). You can also see which keyboard you are using on the taskbar by adjusting "Language bar options" on the same Settings page.

Resharper - Use only Inspection and Nothing Else at All in the Package

I have been evaluating Resharper and have heard how great it is. I agree that its code inspection is great, but I have to seriously disagree with the greatness of most other features.
All of the warts it adds to Visual Studio are killing my productivity. It has eaten Visual Studio's shortcut keys even though I told it not to, and even when I remap "Find All References" to Visual Studio, Resharper still coopts it.
We would like to be able to use the Code Inspection functionality and absolutely nothing else. Is this possible through documented or undocumented methods?
If problem only in keyboard shortcuts, you can change Keyboard scheme to Visual Studio. Go to menu Resharper -> Options -> Keyboard and Menus. Check Visual Studio Keyboard scheme at right part of window and apply it.

Resources