有没有办法改变vim中行号后面的分隔符?

发布于 2024-10-07 04:03:59 字数 96 浏览 0 评论 0原文

当我在 vim 中 ':set number' 时,每一行都有一个行号,后跟一个空格,后跟该行的内容。有没有办法用其他东西代替空间?例如“|”或者几个额外的空格会很整洁,不是吗?

When I ':set number' in vim, each line has a line number followed by a space followed by the content of that line. Is there a way to replace the space with something else? For example a '|' or a couple of extra spaces would be neat, wouldn't it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

2024-10-14 04:03:59

不幸的是,这是不可能的。行号打印在 Vim 的 screen.c,第 2322 行:

sprintf((char *)buf, "%*ld ", w, num);

(w 是宽度,num 是行号)。改变这一点的唯一方法是编辑源代码并重新编译 Vim。

Unfortunately, this is not possible. The line number is printed in Vim's screen.c, line 2322:

sprintf((char *)buf, "%*ld ", w, num);

(w is the width and num is the line number). The only way you could change this would be to edit the source code and recompile Vim.

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