Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rearrange Code shortcut in Resharper doesn't work in VS2015

Tags:

When I try to use the shortcut for moving lines up/down (Ctrl+Alt+Shift+/), it highlights the code and shows the tooltip message "Use Up/Down to move text line" but nothing happens. If however I try the same command via the menu bar (Resharper > Edit > Rearrange Code > Move Up) it moves the selected lines as expected.

I used to use this feature all the time so I find this bug very annoying. Apparantly, others also experience this (see comments for Resharper move line up down not working) but I haven't been able to find a solution for it. Resetting keyboard layouts and reapplying VS keyboard schemes doesn't work.

Has anyone been able to resolve this issue?

like image 289
flitig Avatar asked Aug 02 '16 08:08

flitig


People also ask

How do I change the shortcut key in ReSharper?

Choose Tools | Options from the menu and then go to Environment | Keyboard page. Use the shortcut tables to find the alias of the command, to which you are going to assign a new shortcut. If some command does not have a default shortcut, you can find its alias under the title of the corresponding help page.

Why Ctrl D is not working in VS code?

The main step are: File > Preferences > Keyboard Shortcuts. type "copy line",then you will see the related shortcuts. remember the new shortcut(e.g. Shift + Alt + Down) or modify the shortcut to ctrl + D.

How do I change the shortcut code in Visual Studio?

Advanced customization# To configure keyboard shortcuts through the JSON file, open Keyboard Shortcuts editor and select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar. This will open your keybindings.json file where you can overwrite the Default Keyboard Shortcuts.

How do I enable shortcut keys in Visual Studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard.


1 Answers

[EDIT]

Reason of this is issue (when you are logging to machine with VS and Resharper via Remote Desktop) is that Ctrl-Alt-Left Arrow/Ctrl-Alt-Right Arrow combinations are not sent to your virtual machine

There are two workarounds:

  1. My first soultion (change combination see below)

  2. You can use AutoHotKey script as stated in thread: https://superuser.com/questions/327866/remote-desktop-sending-ctrl-alt-left-arrow-ctrl-alt-right-arrow-to-the-remote-p

[/EDIT]

Reason is duplication of the same hotkeys which could be found in 'Shortcut currently used by:' combobox

Fix is

I described process for _MoveRight shortcut - for other shortcuts it works the same

STEP 1 Check for conflicting changes

seeImage

  • go to Tool --> Options --> Keyboard

  • in field 'Show commands containing' find your command (moveright in example)

  • click in field 'Press shortcut keys' press ALT + RIGHT ARROW

  • in field Shortcut currently used by you will find conflicting shortcut - Edit.CompleteWord...

STEP 2 Now we need to delete this shortcut

  • in field 'Show commands containing' write Edit.CompleteWord

  • you should see ALT + RIGHT ARROW shortcut in field 'Shortcuts for selected command

  • click Remove button

STEP 3 Now we need to add our shortcut to _MoveRight function

  • in field 'Show commands containing' find your command (moveright in example)

  • click in field 'Press shortcut keys' press ALT + RIGHT ARROW

  • click Assign

like image 128
Reven Avatar answered Sep 28 '22 04:09

Reven