2

When using the comment shortcut Ctrl+K+C it comments like this:

/*totaly();
legit.code()*/

This is very inconvenience when you what to uncomment just part of the code. Is there a way to comment multiple lines at the same time like this?

//totaly();
//legit.code()

I am using normal Visual Studio, not VS Code.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Bruno Jambeiro
  • 156
  • 1
  • 9
  • 1
    Hi, normally I use VS with the keboard-shorcuts of `vscode` and to do that I press `Ctrl+/`. With the default Visual Studio keyboard-shorcuts when I press `Ctrl+K+C` it comments all with the `//`. What version Visual Studio are you using? – Jorge Morgado Oct 08 '20 at 02:31
  • 1
    Comments will use `//` if the selection is comprised of full lines. If you want partially selected lines to be fully commented, see [visual studio C++ toggle comment ? comment while not whole line is selected?](https://stackoverflow.com/questions/4350744/visual-studio-c-toggle-comment-comment-while-not-whole-line-is-selected). – dxiv Oct 08 '20 at 03:25
  • @JorgeMorgado Visual studio 2019 community – Bruno Jambeiro Oct 08 '20 at 11:14
  • @BrunoJambeiro that's the same VS I use normally. Go to Tools > Options > Keyboard and you will find all you need – Jorge Morgado Oct 08 '20 at 16:16
  • can't believe threr's no solution for this simple basic feature... – Josh Chiu Dec 30 '21 at 11:00

0 Answers0