问题描述
在 vs 代码中我有以下文件
123一种乙C
现在我执行以下步骤
- 剪断 a b c 线.
- 选择第 1、2、3 行,然后进入多光标模式(shift、alt I).
- 转到每个数字的末尾并输入 a ,然后进行粘贴.
结果是
1,一个乙C2、一个乙C3、一个乙C
但我想要的结果是
1,一个2、乙3、c
也请查看 Mark 的好答案.他提到的 VS Code 有一些更新,也应该考虑.
使用++,您还需要在多光标模式下剪切文本:
+
++
+
+
+
截至
您也可以使用 ++ 和方向箭头来选择多个光标,
in vs code I have the following file
1
2
3
a
b
c
Now I do the following steps
- cut the lines a b c.
- select the lines 1, 2, 3 and then go into multiple cursor mode (shift, alt I).
- 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 ++, you need to cut the text in multiple cursor mode as well:
+
++
+
+
+
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 +. After cutting the text with +, select with multiple cursors again by holding +. Then, type and paste with + like you described.
You can also use ++ and the direction arrows to select with multiple cursors,
这篇关于以多光标模式粘贴数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!