简体   繁体   中英

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 ; .

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

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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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