0

Let's say I have the following code:

if(true)
{
    int a=1;
    long b=1;
    long long c=1;
}

Now I select from i of int a=1; to ; of long long c=1;, and press CTRL+K+C. I expect to see '//' (C++-comment) added to each line of code, but instead I got /**/ (C-comment).

To get C++-comment, I need to include the indention in front of int a=1; into my selection, which is annoying, since most selection shortcuts won't behave this way(shift+home+end or tripple-click selection)

Visual Studio Version: Microsoft Visual Studio Community 2022 17.5.1

Have checked visual studio C++ toggle comment ? comment while not whole line is selected? and Visual Studio C++ Multiline comments. The macro solution of the first link seems nice, but I failed to find macro-related option in VS2022. Moreover, I don't think the behaviour mentioned above is a intended 'feature'

SYLG
  • 1

0 Answers0