【问题标题】:Does Visual Studio 2017 have a specific keyboard combination for create single-line comments?Visual Studio 2017 是否具有用于创建单行注释的特定键盘组合?
【发布时间】:2018-12-10 10:57:03
【问题描述】:

我有一个问题。当我在 IntelliJ IDEA 中工作时,我使用组合 Ctrl + / 来创建单行 cmets。目前,我在 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);

但是当我选择这些行并按“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 是否有用于创建单行 cmets 的特定组合? 我正在用 C++ 编程。 谢谢!

【问题讨论】:

  • 评论选择只有一个命令。所以(除非通过扩展添加)只有一个选项。它的使用方式取决于语言(例如 C# 你得到 line cmets)
  • @Richard 好的!谢谢!

标签: c++ visual-studio comments


【解决方案1】:

如果你不选择整行,你会得到/* ... */ cmets。如果你选择整行,你会得到//风格的评论。

还可以尝试使用“CTRL + K + C”而不进行任何选择,您应该使用// 样式将当前行注释掉,如您的示例所示。

否则在 Visual Studio 中查找 cmets 的当前键分配。转到“工具 > 选项”,导航到“环境 > 键盘”并查找“Edit.CommentSelection”的快捷方式。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-09
    • 2015-12-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多