以多光标模式粘贴数据 [英] Pasting data in multiple cursor mode

查看:27
本文介绍了以多光标模式粘贴数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 vs 代码中我有以下文件

123一种乙C

现在我执行以下步骤

  1. 剪断 a b c 线.
  2. 选择第 1、2、3 行,然后进入多光标模式(shift、alt I).
  3. 转到每个数字的末尾并输入 a ,然后进行粘贴.

结果是

1,一个乙C2、一个乙C3、一个乙C

但我想要的结果是

1,一个2、乙3、c

解决方案

也请查看 Mark 的好答案.他提到的 VS Code 有一些更新,也应该考虑.

使用Shift+Alt+I,您还需要在多光标模式下剪切文本:

1回车2回车3回车回车a回车b回车c

Shift+

Shift+Alt+I

Shift+

Ctrl+X

,

Ctrl+V

截至

您也可以使用 Ctrl+Alt+Shift 和方向箭头来选择多个光标,

in vs code I have the following file

1
2
3

a
b
c

Now I do the following steps

  1. cut the lines a b c.
  2. select the lines 1, 2, 3 and then go into multiple cursor mode (shift, alt I).
  3. go to the end of the each number press and type a , and then do a paste.

The result is

1, a
b
c
2, a
b
c
3, a
b
c

but the result I wanted is

1, a
2, b
3, c

解决方案

Check out Mark's good answer as well. There have been some updates to VS Code he mentions that should be considered as well.

Using Shift+Alt+I, you need to cut the text in multiple cursor mode as well:

1Enter2Enter3EnterEnteraEnterbEnterc

Shift+

Shift+Alt+I

Shift+

Ctrl+X

, 

Ctrl+V

As of the 1.23.1 April update, a more convenient, middle mouse button selection can be used.

With the cursor and keyboard, Instead of cutting the lines like normal, select from the end of the cursor to the beginning while in multi-cursor mode while holding Ctrl+Shift. After cutting the text with Ctrl+X, select with multiple cursors again by holding Ctrl+Shift. Then, type ,  and paste with Ctrl+V like you described.

You can also use Ctrl+Alt+Shift and the direction arrows to select with multiple cursors,

这篇关于以多光标模式粘贴数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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