Vim中的空白行是否可能不显示〜? [英] Is it possible to not display a ~ for blank lines in Vim?

查看:67
本文介绍了Vim中的空白行是否可能不显示〜?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Vim中不显示〜的空白行?

Is it possible to not display a ~ for blank lines in Vim?

这使Mac Vim的滚动条感到困惑,我完全不喜欢这些波浪号.

This confuses Mac Vim's scrollbar, and I quite don't like these tildes.

推荐答案

正如jamessan所说,您不能将其禁用.滚动行为也不是MacVim特有的,它在终端和gvim中的工作方式相同:

As jamessan said, you can’t disable them. The scrolling behavior isn’t specific to MacVim, either — it works the same way in the terminal and in gvim:

您应该将其视为Vim灵活性的一部分,而不是将其视为问题.例如,您可以使用 zt 命令将当前行滚动到屏幕顶部,而不管其在文件中的位置.这样可以更轻松地编写可以完成某些工作的宏,然后滚动回原来的位置.因此,命令< C-E> < C-Y> 变得更简单,因为'scrolloffset'选项也是如此.

Instead of seeing this as a problem, what you should do is learn to see this as part of Vim’s flexibility. For example, you can use the zt command to scroll the current line to the top of the screen, regardless of where in the file it is. This can make it easier to write macros that do some work and then scroll back to where you were. The commands <C-E> and <C-Y> are made simpler because of this, as is the 'scrolloffset' option.

如果必须的话,请重新训练大脑,以将Vim的滚动条认为是映射到哪一行位于顶部,而不是可见的屏幕.

If you must, retrain your brain to think of Vim’s scrollbar as mapping to which line is on top, instead of which screenful is visible.

这篇关于Vim中的空白行是否可能不显示〜?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆