Vim-重新格式化文本,使其位于同一行上
我试图让vim将我的段落设置为一行。假设我有这段文字:Vim-重新格式化文本,使其位于同一行上,vim,Vim,我试图让vim将我的段落设置为一行。假设我有这段文字: this is a sentence this is another sentence and another 我如何获得以下信息: this is a sentence this is another sentence and another 谢谢 每行?看一看J操作符:hj。 多行?[COUNT]J将在您的示例中执行3J 每个街区?像v}J这样的东西应该能做到。当然,每种视觉选择都适用。 每正则表达式?使用:g命令f.e.:g/th
this is a sentence
this is another sentence
and another
我如何获得以下信息:
this is a sentence this is another sentence and another
谢谢
每行?看一看J操作符:hj。
多行?[COUNT]J将在您的示例中执行3J
每个街区?像v}J这样的东西应该能做到。当然,每种视觉选择都适用。
每正则表达式?使用:g命令f.e.:g/this/norm J
你应该确切地说明你想要什么。因为vim中总是有很多不同的解决方案。在连接线之间有空格
:%join
没有空间添加
:%join!
使用“连接”将不会移动光标