Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vim-重新格式化文本,使其位于同一行上_Vim - Fatal编程技术网

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

我试图让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/this/norm J
你应该确切地说明你想要什么。因为vim中总是有很多不同的解决方案。

在连接线之间有空格

:%join
没有空间添加

:%join!
使用“连接”将不会移动光标