禁用文件第一行/最后一行的闪烁
所以对我来说,这非常烦人,
我在文件的第一行/最后一行,当我点击 k/j 时,所有文本屏幕都会闪烁。我知道这很愚蠢,但可以禁用它。
So for me this is very annoying
I am at the first/last line of the file and when I hit k/j all text screen blinks. I know this is stupid but it is possible to disable this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
要完全禁用可视铃:在 vimrc 或 gvimrc 中设置 t_vb= (如果您使用 gvim,则必须将其放入 gvimrc,因为在获取 vimrc 后 &t_vb 选项会重置)。
要将视觉铃声变成蜂鸣声:
设置 novisualbell
。我觉得它更烦人,但它也回答了问题:禁用屏幕闪烁。要关闭 j/k 命令的可视铃声,您必须重新映射它们:
To disable visual bell completely:
set t_vb=
in vimrc or gvimrc (if you use gvim, you must put it into gvimrc because &t_vb option is reset after vimrc is sourced).To turn visual bell into beep:
set novisualbell
. I find it more annoying, but it also answers the question: disabling screen blinking.To turn off visual bell for j/k commands you will have to remap them:
您可以将下面的行添加到
.vimrc
中:它将禁用铃声和视觉闪光灯。
You can add the line below to your
.vimrc
:It will disable both the bell and the visual flash.
一个有用的命令(也适用于 vimrc 文件)是
set belloff=all
这应该在所有情况下关闭闪烁,包括
esc
。需要最新版本的 Vim (7.4+)
请参阅以下位置的其他讨论
https://stackoverflow.com/a/41524053/423033
https://vi.stackexchange.com/questions/4653/vim-不应该的时候仍然闪烁
A useful command (that also works in the vimrc files) is
set belloff=all
This should turn off flashing in all cases, including
esc
.Requires a recent version of Vim (7.4+)
See other discussion at
https://stackoverflow.com/a/41524053/423033
https://vi.stackexchange.com/questions/4653/vim-still-flashing-when-it-shouldnt-be
这是违反直觉的,但是为了完全禁用视觉铃声你必须:
set Visualbell
set t_vb=
,即设置视觉效果启用后响铃清空。
如果没有为您设置 Visualbell(默认情况下我的没有),仅将 t_vb 设置为空不会禁用闪烁。
This is counterintuitive, but in order to disable the visual bell completely you have to:
set visualbell
set t_vb=
that is, set the effect of visual bell to empty after enabling it.
If visualbell is not set for you (by default mine wasn't), setting t_vb to empty only will not disable the flashing.