Visual Studio 2017 是否有用于创建单行注释的特定键盘组合?

Does Visual Studio 2017 have a specific keyboard combination for create single-line comments?

我有一个问题。当我在 IntelliJ IDEA 中工作时,我使用 Ctrl + / 组合来创建单行注释。现在,我在 Microsoft Visual Studio 2017 工作,我只看到一个组合(Ctrl + K + C),但它会创建多行注释。例如:

(我想得到)

//InputComponent->BindAxis("MoveForward", this, &ACustomPlayerController::MoveForward);
//InputComponent->BindAxis("MoveRight", this, &ACustomPlayerController::MoveRight);
//InputComponent->BindAxis("Turn", this, &ACustomPlayerController::Turn);

但是当我 select 这些行并按下 "Ctrl + K + C" 我得到这样的结果:

InputComponent->Bi/*ndAxis("MoveForward", this, &ACustomPlayerController::MoveForward);
InputComponent->BindAxis("MoveRight", this, &ACustomPlayerController::MoveRight);
InputComponent->Bind*/Axis("Turn", this, &ACustomPlayerController::Turn);

MVS 2017 是否有用于创建单行注释的特定组合? 我正在用 C++ 编程。 谢谢!

如果您没有 select 整行,您将收到 /* ... */ 条评论。如果你 select 整行,你将得到 // 样式注释。

也可以尝试使用不带任何 selection 的“CTRL + K + C”,您应该会像您的示例中那样用 // 样式注释掉当前行。

否则在 Visual Studio 中查找当前键分配以获取评论。转到 "Tools > Options",导航到 "Environment > Keyboard" 并查找 "Edit.CommentSelection" 的快捷方式。