如何将光标放在 Visual Studio Code 中所有选定行的末尾? [英] How to put the cursor at the end of all selected lines in Visual Studio Code?

查看:57
本文介绍了如何将光标放在 Visual Studio Code 中所有选定行的末尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码:

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+鼠标按钮 和输入获得了第一位.如何将 "); 添加到每行的末尾?

I got the first bit using Alt+Shift+mouse button and typing. How do I add "); to the end of each line?

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

I had to use Notepad++ macro recording to do it and this is the only reason I still hang on to that editor. If someone can tell me how to do it in VSCode, I'd be very grateful.

推荐答案

不太确定我理解,但是 Shift-Alt-I会将光标放在所有选定行的末尾,因此只需选择您的文本和 Shift-Alt-I(即眼睛"在末尾).然后输入 "); 将把它放在每一行的末尾.

Not completely sure I understand, but Shift-Alt-I will put a cursor at the end of all selected lines so just select your text and Shift-Alt-I (that is an 'eye' at the end). Then typing "); will put that at the end of each line.

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

---------------------- Edit -------------------------------

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

I see that Column Selection Mode (in v1.43) does this nicely now (with Selection/Column Selection Mode enabled) depending on your direction of selection [unfortunately the gif does a poor job of showing the cursors but they are all at the beginning or ends of the lines depending on the direction of selection]:

这篇关于如何将光标放在 Visual Studio Code 中所有选定行的末尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆