有没有办法改变vim中行号后面的分隔符?
当我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,这是不可能的。行号打印在 Vim 的 screen.c,第 2322 行:
(w 是宽度,num 是行号)。改变这一点的唯一方法是编辑源代码并重新编译 Vim。
Unfortunately, this is not possible. The line number is printed in Vim's screen.c, line 2322:
(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.