20

I know this topic has been asked multiple times. But I don't seem to be able to disable the acoustic bell in MacVim. What I have in my .vimrc:

set noerrorbells 
set novisualbell
set t_vb=

Am I missing anything?

Saucier
  • 4,200
  • 1
  • 25
  • 46

3 Answers3

28

This should be the missing piece:

autocmd! GUIEnter * set vb t_vb=
romainl
  • 186,200
  • 21
  • 280
  • 313
  • 6
    Great, thanks a lot! I finally ```set visualbell t_vb=``` to disable it in both vim and MacVim. After re-reading ```help``` it clearly states what you proposed. Seems like I missed it over and over again. – Saucier Apr 16 '13 at 21:23
  • one question, macVim==Gui vim? know nothing about Mac. what is the vim in Mac terminal (iTerminal? ) called? not macVim? – Kent Apr 16 '13 at 21:24
  • Yes, MacVim is a GUI version for Mac, just like GVim for Linux. You can symlink/alias the binary (MacVim.app/Contents/MacOS/Vim) in the MacVim.app package which is plain vim in the terminal then. – Saucier Apr 16 '13 at 21:25
  • @Kent, MacVim == Gvim. It comes with a CLI executable that one can run in the shell, though. – romainl Apr 16 '13 at 21:29
  • I thought all vim in mac are called macVim...I am wrong. upvote your answer to say thank you.... @Ube thank you too... – Kent Apr 16 '13 at 21:34
  • 1
    Additionally it ships a script ```mvim``` which lets you open files from the terminal in MacVim. – Saucier Apr 16 '13 at 21:37
4

For anyone that for some reason couldn't make this work.

set vb t_vb= " no visual bell & flash

did the job for me.

Renan Cidale
  • 842
  • 2
  • 10
  • 23
3

Even set belloff=all in your .vimrc

Joannes
  • 2,569
  • 3
  • 17
  • 39
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/26264362) – Rob Scott May 29 '20 at 11:23
  • 1
    @RobScott This setting in my .vimrc disable with success the acoustic bell. I don't want to make any criticism. Anyway thanks for your words. – Joannes May 29 '20 at 11:29
  • @Joaness - Understood. The answer was flagged by SO (and therefore displayed in the "for review" edits). SO will automatically enter that default comment, based on the decision I entered. My apologies for accepting the flag, as it was in the category of "questionable answers", based on the length of characters. When answering an old post especially, include updated docs and/or version updates and/or explaination(s) for why your newly posted answer is correct. – Rob Scott May 29 '20 at 11:44
  • @RobScott I agree. Thanks! I was on the subject in the past few days and had found this solution that seems to work. I happened on this question today and in a hurry I wrote a few words. It won't happen again. – Joannes May 29 '20 at 12:26