I am using Visual Studio 2013, and I would like Ctrl+E to map to Edit.LineEnd
. Basically, the same thing that happens when you hit end.
I can remap it under options/environment/keyboard, but the problem is visual studio still treats Ctrl+E as a chord. Instead of going to the end of the line when I hit Ctrl+E I see a message below :
(Ctrl+E) was pressed. Waiting for second key of chord.
This does not happen when I remap Ctrl+A, Ctrl+N, Ctrl+P, Ctrl+F, or Ctrl+B.
This looks like a side effect of how Visual Studio layers command routing and key bindings...
If you look at the default bindings (my settings were based on the C# profile), you can see there are a ton of other bindings that start with Ctrl+E:
Important observations:
If you set your binding in the Global scope, it falls last on the priority (i.e. any specific context overrides a more generic one). Since you're in the text editor, it's trying to match the chord that exists in that context.
If you were to bind your new shortcut in the Text Editor (that's the dropdown labeled Use new shortcut in:
, which defaults to Global), it would actually remove the keybinding for Edit.ToggleWordWrap. That's because you can't have a keybinding overlap with a chord, so VS assumes you really want the one you're trying to add and nukes the conflicts.
Alternatively, if you want to keep both, you could remap Edit.ToggleWordWrap
to a different binding first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With