如何在 Vim 中快速连接两行?
基本操作是,假设我在打开的缓冲区中有两行python代码,
datacontour(set_color=set_color, figout="test",
figext="pdf")
第二行缩进8个空格,因为它是第一行的延续,现在我想将这两行组合在一起,消除两行之间的空格
datacontour(set_color=set_color, figout="test", figext="pdf")
做到这一点最简单的方法是什么?或者我应该在 vimrc 文件中定义什么样的快捷方式?谢谢。
The basic operation is, imagine I have two lines of python codes in the opening buffer
datacontour(set_color=set_color, figout="test",
figext="pdf")
the second line is indented by 8 spaces because it is a continuation of the first line, now I want to combine both lines together, eliminating the spaces between the two
datacontour(set_color=set_color, figout="test", figext="pdf")
What is the easiest way to do this? or what kind of shortcut I should define in the vimrc file? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从“dataContour...”行按 J
下一行将合并到当前行。
Press J from the line 'dataContour...'
The next line will be merged to the current line.
当光标位于两行中的第一行时,键入“J”(大写 J)。
Type "J" (capital J) while your cursor is on the first of the two lines.
在第一行输入 J。
希望有帮助
Type J on the first line.
hope it helps