Visual Studio Code列编辑和多光标编辑

列编辑

要求:下面的文本,要在行头插入cp,行尾插入src(Windows):

../src/thil
../src/thre
../src/thre
../src/thre.h
../src/threp
../src/thTrpp
../src/the.cpp

多行行首插入:光标移动到第一行行首(最后一行也可以),按住ALT+SHIFT,移动鼠标选择多行,直接输入cp 就可以(也可以移动到任一列)::

cp ../src/thil
cp ../src/thre
cp ../src/thre
cp ../src/thre.h
cp ../src/threp
cp ../src/thTrpp
cp ../src/the.cpp

多行行尾插入:选择多列,按住ALT+SHIFT+I,直接输入./src 就可以(也可以移动到任一列)::

cp ../src/thil ./src
cp ../src/thre ./src
cp ../src/thre ./src
cp ../src/thre.h ./src
cp ../src/threp ./src
cp ../src/thTrpp ./src
cp ../src/the.cpp ./src

多光标编辑

ALT,然后点击鼠标选择不同的位置,就可以编辑了。

下载VSC:https://code.visualstudio.com/
https://kencenerelli.wordpress.com/2018/03/25/visual-studio-code-multi-line-and-multi-cursor-editing/
https://stackoverflow.com/questions/30037808/multiline-editing-in-visual-studio-code

你可能感兴趣的:(小工具)