1

In Visual Studio you can "comment in" or "comment out" selected lines of code with two different shortcuts.

I want a single shortcut, to toggle the comment. So I don't have to care about two shortcuts.

In Visual Studio 2010 I solved this by creating a macro that did this for me. 2013 no longer supports macros.

How can I accomplish the same in 2013? I also have ReSharper if that helps...

Sebastian Häni
  • 566
  • 4
  • 17

2 Answers2

1

You may try using ReSharper | Edit | Comment with Line Comment and ReSharper | Edit | Comment with Block Comment (related shortcuts are shown near a menu item name and depend on selected keymap scheme). If you select already commented code and hit the shortcut for Comment with Line Comment action - it will uncomment the code and vice versa.

Alexander Kurakin
  • 13,373
  • 2
  • 33
  • 29
1

no there is.
select lines and:
Ctrl+E than C to comment
Ctrl+E than U to uncomment

old style
Ctrl+K than Ctrl+C to comment
Ctrl+K than Ctrl+U to uncomment

both will work forever. VS standards.

Zen Of Kursat
  • 2,672
  • 1
  • 31
  • 47