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.
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:
noremap <expr> k ((line('.')==1)?'':'k')
noremap <expr> j ((line('.')==line('$'))?'':'j')
You can add the line below to your .vimrc
:
autocmd GUIEnter * set vb t_vb= " for your GUI
autocmd VimEnter * set vb t_vb=
It will disable both the bell and the visual flash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With