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?

2 Answers 2


Have you tried adding the following to your .vimrc?

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

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

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

  • This worked great for me on, VIM - Vi IMproved 8.2, Homebrew 2.5.0, macOS Catalina 10.15.6 on 12 Sep 2020. Sep 12, 2020 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.