Ctrl + E, C taken by ReSharper and not given back

JetBrains ReSharper 5.1 C# Edition
Build 5.1.1766.4 on 2011-01-12T16:31:10

Plugins: none.
Visual Studio 10.0.30319.1.

I like using Ctrl+E, C and Ctrl+E, U to comment and uncomment code blocks. I installed ReSharper and used the Visual Studio keyboard scheme, which states that it doesn't steal keybindings from existing VS features. But it's stolen Ctrl+E, C for the cleanup code dialog. And what's worse, if I choose "None" for the keyboard scheme, apply it and restart VS, it hasn't been restored and it's still bringing up the cleanup code dialog.

Is there some way to get my commenting shortcut back?

13 comments

Ahh, the specific keyboard shortcuts are still managed with Visual Studio. I was checking in the ReSharper settings. I was able to take the shortcuts back manually.

0

Ctrl+Shift+R is also a default VS keybind (record temporary macro) that ReSharper took. :(

0

Grr. And it takes them back again on updates.

0

Any reason you don't use the ReSharper Ctrl-/ to comment and uncomment
blocks of code instead?


"Random Engy"  wrote in message
news:5384021.720231296507925329.JavaMail.devnet@domU-12-31-39-18-36-57.compute-1.internal...

JetBrains ReSharper 5.1 C# Edition
Build 5.1.1766.4 on 2011-01-12T16:31:10

Plugins: none.
Visual Studio 10.0.30319.1.

I like using Ctrl+E, C and Ctrl+E, U to comment and uncomment code
blocks. I installed ReSharper and used the Visual Studio keyboard scheme,
which states that it doesn't steal keybindings from existing VS features.
But it's stolen Ctrl+E, C for the cleanup code dialog. And what's worse,
if I choose "None" for the keyboard scheme, apply it and restart VS, it
hasn't been restored and it's still bringing up the cleanup code dialog.

Is there some way to get my commenting shortcut back?

---
Original message URL: http://devnet.jetbrains.net/message/5285107#5285107

0

Didn't know about it. I'll try it out though. Ctrl+E, C has the advantage of taking only one hand to do (right hand selects area with mouse, left comments the block) and being able to more easily deal with nested comments. There are some uses of having //// comments to appease StyleCop.

That and it's a VS standard command so I have muscle memory for it already.

Anyway, my main complaint was that ReSharper advertises that it doesn't overwrite standard VS shortcuts.

0

Well, you can certainly remap things.

I understand your complaint though.  But it's user configurable when you
discover places that they missed.  Given all the features VS has and all the
features ReSharper adds, it must be difficult or impossible to avoid ANY
conflicts... especially when VS keeps adding new key bindings that may have
been clear in previous/earlier versions for ReSharper to use.

Just go into Tools->Options and customize any keybinding to be whatever you
want.


"Random Engy"  wrote in message
news:20251224.773741297126022017.JavaMail.devnet@domU-12-31-39-18-36-57.compute-1.internal...

Didn't know about it. I'll try it out though. Ctrl+E, C has the advantage of
taking only one hand to do (right hand selects area with mouse, left
comments the block) and being able to more easily deal with nested comments.
There are some uses of having //// comments to appease StyleCop.

That and it's a VS standard command so I have muscle memory for it already.

Anyway, my main complaint was that ReSharper advertises that it doesn't
overwrite standard VS shortcuts.

---
Original message URL: http://devnet.jetbrains.net/message/5285776#5285776

0

Perhaps then you could change the description on the Visual Studio keyboard scheme choice?

"Shortcuts for ReSharper features without VS counterparts are chosen so that not to steal keybindings from existing VS features."

Besides the grammar error, it's not really an accurate description anymore...

0

Hello,

Didn't know about it. I'll try it out though. Ctrl+E, C has the
advantage of taking only one hand to do (right hand selects area with
mouse, left comments the block) and being able to more easily deal
with nested comments. There are some uses of having //// comments to
appease StyleCop.

That and it's a VS standard command so I have muscle memory for it
already.


I've just verified on freshly-installed VS2008 and VS2010 with default settings,
and neither has CtrlE, CtrlC bound out of the box for text files. In VS2008,
the only Ctrl+E-starting chord is for text wrapping mode of the editor. In
VS2010 there're lots of Ctrl+E shortcuts in the workflow designer (including
CtrlE, CtrlC), but those do not apply to text files. That's why took the
liberty of assigning CtrlE, CtrlC to our feature.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Hello,

Grr. And it takes them back again on updates.


Unfortunately, yes. Visual Studio has no means for overriding keyboard shortcuts
gracefully, and it's not so trivial to track custom user bindings when a
new build wants to apply its shortcuts. We hope to address the issue soon.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

The shortcut I was referring to was Ctrl+E, C; which I believe is slightly different than Ctrl+E, Ctrl+C (The difference being if you keep holding down Ctrl to hit the second key). Ctrl+E, C is used by Visual Studio out of the box for comment selection. It's even on the official "default key bindings" reference poster: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=92ced922-d505-457a-8c9c-84036160639f

0

Any reason you don't use the ReSharper Ctrl-/ to comment and uncomment
blocks of code instead?

I don't know. But there are difference between ReSharper's and VS 2008's _line_ comments.
ReSharper places the comment characters (//) at beginning of row. VS 2008 places // where I want to.

Example:

Original code:

    if(anyBoolean)
    {
        doSomething1();
        doSomething2();
        doSomething3();
    }



ReSharper's line comment:

    if(anyBoolean)
    {
        doSomething1();
//        doSomething2();
//        doSomething3();
    }


VS 2008's line comment:

    if(anyBoolean)
    {
        doSomething1();
        //doSomething2();
        //doSomething3();
    }


I like more the kind of VS 2008.

And VS 2008 has an extra shortcut for uncommenting line. So it is possible to add // to an existing //. ReSharper with the one line comment shortcut would remove // in this case.

0

ReSharper also steals all the Debugging Shortcuts starting with CTRL-D and replaces them with the most usefull command ever: duplicate line (Tested with 2016.3 but I know this issues from past versions too).

0

Hello 

You might remove Crtl+D shortcut from ReSharper action in Tools | Options | Environment | Keyboard. Similar request https://youtrack.jetbrains.com/issue/RSRP-458120.

Thanks!  

0

Please sign in to leave a comment.