【问题标题】:How to put the cursor at the end of all selected lines in Visual Studio Code?如何将光标放在 Visual Studio Code 中所有选定行的末尾?
【发布时间】:2018-09-30 14:17:57
【问题描述】:

我有以下代码:

CList.Add( new CodeStuff(941,"National List Limit
CList.Add( new CodeStuff(945,"Code not used
CList.Add( new CodeStuff(946,"State Building Height Limit
CList.Add( new CodeStuff(993,"Building Material Type
CList.Add( new CodeStuff(1033,"Not used - requirements changed
CList.Add( new CodeStuff(1034,"Current Unacceptable Applications
CList.Add( new CodeStuff(1035,"Historical Unacceptable Applications

我使用 Alt+Shift+鼠标按钮 和打字得到了第一位。如何在每行末尾添加");

我不得不使用 Notepad++ 宏录制来做到这一点,这是我仍然坚持使用该编辑器的唯一原因。如果有人能告诉我如何在 VSCode 中做到这一点,我将非常感激。

【问题讨论】:

标签: visual-studio-code


【解决方案1】:

在 Windows 10 上,如果我点击 ShiftAltI,所有光标都会转到每行的开头。要将光标移动到每行的末尾,只需在此之后按 End 键即可。

【讨论】:

    【解决方案2】:

    不完全确定我理解,但是 Shift-Alt-I 会将光标放在所有选定行的末尾,所以只需选择您的文本和 Shift-Alt-I (最后是“眼睛”)。然后输入"); 会将其放在每一行的末尾。

    ---------------------- 编辑 ------------------------ -------

    我看到Column Selection Mode(在 v1.43 中)现在做得很好(启用Selection/Column Selection Mode)取决于您的选择方向[不幸的是,gif 在显示光标方面做得很差,但它们都在行的开始或结束取决于选择的方向]:

    【讨论】:

      【解决方案3】:

      在 Mac Vscode 上,我相信诀窍是“鼠标”选择要附加的行,然后点击 Shift+Option +.

      【讨论】:

        猜你喜欢
        • 2020-02-21
        • 2017-11-26
        • 2015-02-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多