如何在 Vim 中快速连接两行?

发布于 2024-12-25 07:07:17 字数 339 浏览 3 评论 0原文

基本操作是,假设我在打开的缓冲区中有两行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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无风消散 2025-01-01 07:07:17

从“dataContour...”行按 J

下一行将合并到当前行。

Press J from the line 'dataContour...'

The next line will be merged to the current line.

聚集的泪 2025-01-01 07:07:17

当光标位于两行中的第一行时,键入“J”(大写 J)。

Type "J" (capital J) while your cursor is on the first of the two lines.

嘿哥们儿 2025-01-01 07:07:17

在第一行输入 J。
希望有帮助

Type J on the first line.
hope it helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文