Vim, how to play without the beeps?

7

I have started to like coding while listening to music. However this means I can't use vim with the sound off.

It seems I get a beep when I press escape, or press :

I'm on a Mac, and I love vim and now love listening to music at the same time.

How can I use vim so I don't make these mistakes -- or can I just disable beep from the terminal? Why does vim beep so?

Cris Stringfellow

Posted 2013-02-18T09:38:50.653

Reputation: 709

Answers

10

Have you tried adding the following to your .vimrc?

set noerrorbells visualbell t_vb=
if has('autocmd')
  autocmd GUIEnter * set visualbell t_vb=
endif

Hint: Vim Wikia is almost always the best place to look for Vim tips

Andre de Miranda

Posted 2013-02-18T09:38:50.653

Reputation: 616

2still waiting... :-) – Andre de Miranda – 2013-02-26T10:55:59.417

1

set belloff=all

worked on Ubuntu 18.04, vim-gtk3 8.0.

See also: https://stackoverflow.com/questions/18589352/how-to-disable-vim-bells-sounds

Ciro Santilli 新疆改造中心法轮功六四事件

Posted 2013-02-18T09:38:50.653

Reputation: 5 621