Ctrl+R, Ctrl+R command not working

45,800

Solution 1

I was able to fix this by doing the following:

  1. Go to ResharperOptions menu commmand
  2. Select EnvironmentKeyboard & Menus
  3. Select the Visual Studio option under Keyboard Shortcuts
  4. Click Apply Scheme and Save

This will cause Ctrl+R, Ctrl+R to do a rename. (Select ReSharper options in the dialog box that pops up then.)

However, it made F2 no longer able to preform a rename. I was able to fix that by doing the following:

  1. Go to ReSharperOptions menu command
  2. Select EnvironmentGeneral
  3. Select the ReSharper 2.x or IntelliJ IDEA under Restore ReSharper keyboard shortcuts
  4. Click Apply or OK

This allows both F2 and Ctrl+R, Ctrl+R commands to work for renaming a variable.

This seems to be specific to ReSharper being installed with Visual Studio, I don't know what the solution would be to fix this if ReSharper weren't installed.

ReSharper Options Menu

Solution 2

For Resharper 6

You should:

  • Select menu "Resharper" - "Options..."
  • Select "Visual Studio Integration"
  • Choose "Visual Studio" in both places
  • Click "Apply Scheme"

It will either works or you will have a selection to do (Visual Studio or Resharper), if it is so, then choose Resharper.

Solution 3

In my case the problem was solved by clearing the ReSharper cache. This can be done in the options menu under Environment > General here:

Screenshot of options menu

Solution 4

resharper has multiple default shortcut bindings that is chosen the first time you start visual studio after instalation. My guess is you picked a different one this time.

Solution 5

Using version 8 of ReSharper in Visual Studio 2013, I had to

  1. Go to the RESHARPER menu -> Options
  2. Expand Environment
  3. Select Keyboard & Menus
  4. Choose Visual Studio as the ReSharper keyboard scheme
  5. Click Apply Scheme...Save & close dialog box.

The next time I executed a keyboard shortcut it prompted me to choose which keyboard shortcut I wanted to use.

enter image description here

Share:
45,800
mwright
Author by

mwright

Objective C

Updated on August 13, 2020

Comments

  • mwright
    mwright almost 4 years

    I'm attempting to use the Ctrl+R, Ctrl+R command within Visual Studio 2008 to rename a variable. I get an error message at the bottom saying that

    "The key combination (Ctrl+R, Ctrl+R) is bound to command (&Rename...) which is not currently available."

    I am not running it or anything I can think of which might prohibit modifications of the file and the F2 command allows a rename to happen. Anyone know how to fix this?

    EDIT: I do have Resharper installed but was previously able to do this with the same setup, I recently migrated computers.

  • mwright
    mwright about 14 years
    This was helpful in fixing the problem.
  • Milos Vidakovic
    Milos Vidakovic about 14 years
    @mwright - be sure to mark a solution if it helped you solve the issue.
  • mwright
    mwright about 14 years
    @CrimsonX - while helpful it wasn't actually the solution, I guess what's protocol on that? You mark it as solution and then update your post to include the steps for the solution or create your own answer?
  • Milos Vidakovic
    Milos Vidakovic about 14 years
    @mwright. A good question. If I were in your situation, and found a detailed answer with the help of myself, I'd answer my own question, mark it as the answer, and thank (and upvote) people that helped you find the solution. Its a judgment call...
  • Anatoly Mironov
    Anatoly Mironov over 12 years
    Thanks! It helped. Resetting to Visual Studio lets you choose Resharper then (when shortcut conflicts arise).
  • JakeJ
    JakeJ almost 12 years
    I never thought setting to visual studio would allow me to use resharper commands.. Strange how that works...
  • Chucky
    Chucky about 11 years
    It appears I don't have ReSharper so I'm still looking for a solution to this problem.
  • Boyan
    Boyan almost 11 years
    @Chucky you can map the keyboard shortcut in Visual Studio by going to Tools -> Options -> Environment -> Keyboard, looking up Refactor.Rename under the "Show commands containing:" field, and setting it to CTLR + R, CTRL + R under "Press shortcut keys:"
  • Anders Lindén
    Anders Lindén over 9 years
    I found it under 1. resharper->options 2. Keyboard & menus 3. Select Visual studio and press "Apply scheme", 4. Click Save
  • garryp
    garryp about 9 years
    Just to add sometimes you need to restart Visual Studio for this to take effect. Certainly I did in VS2013
  • Umut Özel
    Umut Özel almost 9 years
    If it doesn't work, try to uncheck "Hide overridden Visual Studio menu items". It worked for me.
  • yu yang Jian
    yu yang Jian about 6 years
    That's Good Point!
  • Joel Balmer
    Joel Balmer almost 5 years
    Equally, I tried tons of things above but before clearing ReSharper cache I closed files and Visual Studio and reopened. Seemed to work. Annoying! But hey, problem solved :)