简体   繁体   English

是否有Visual Studio键盘快捷键可以跳到行尾并添加分号?

[英]Is there a Visual Studio keyboard shortcut that jumps to the end of a line and adds a semicolon?

我没有在此列表中看到任何东西,但我可能错过了。

No. 没有。

You can just type End and than ; 您可以只输入End and than ; .

If you have strange keyboard without "end" - consider adding custom binding for "Edit.EmacsLineEnd" command to key combination of your choice via Tools->Customize->Keyboard 如果您的键盘不带“ end”,请考虑-通过“工具”->“自定义”->“键盘”为您选择的组合键添加“ Edit.EmacsLineEnd”命令的自定义绑定

If you really need that operation to be one-click you'll have to write extension. 如果您确实需要一键式操作,则必须编写扩展名。

You can create the following C# command with my Visual Commander extension and assign a shortcut to it: 您可以使用Visual Commander扩展名创建以下C#命令并为其分配快捷方式:

    DTE.ExecuteCommand("Edit.LineEnd");
    (DTE.ActiveDocument.Selection as EnvDTE.TextSelection).Text = ";";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM