Think before you speak, read before you think.

vim横竖行互相切换

by

in

几列变成一行,以空格分隔

选择好需要变成一行的几行,按 J

对整个文件使用

:%j

如果是一行,以空格分开,变成以 , 分隔

以替换的方式实现,^M是按 control + v + m

:%s/ /^M/g

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *