How do I get rid of the bell in Vim on PyCharm on Windows?
One of the most infuriating things in the world is when the the bell goes off continuously when using the Vim plugin in PyCharm. Actually, this holds true for all of the JetBrains IDEs, but I have been working mostly with Python recently, and as such, it is PyCharm that is on the top of my mind.
While there are a number of plugins that you can get for the JetBrains products, the one that I always end up installing is Vim. Call me old school, but back in the day, I had to work on remote systems. It was either Vim or Pico, and I chose Vim. Now that I have modern IDEs, I still end up using Vim for all my editing needs. The muscle memory is built in, and I don’t even think about it anymore.
But what about the Bell?
While I have used Linux or Mac as my primary development environment for the last 10 years, I am recently decided to see how well I can survive while coding using Windows. That being what it is, I installed PyCharm, got the Vim plugin installed, and went to get to work. And then it happened, the audible bell of hell. I added my regular vimrc file into my home directory, and no dice.
The bell was still there.
I double checked my settings, and to no avail, the stupid bell would not go away. It was driving me crazy. I turned off the volume on my computer while I was working on the issue. And then, after digging through the documentation on the JetBrains documentation website I found the answer. The Vim modules for JetBrains does not look at the .vimrc file.
The fix….
The Vim plugin for PyCharm and all the JetBrain products uses the .ideavimrc file.
set noeb
set novb
set belloff=all
Then, all you have to do is save and exit. Restart the IDE, and you are done.
No more bell. Well, at least on Windows. But, this should not be that hard, but then again, I think with some of the settings that are built into the various IDEs, they did not want to pick up all the settings in a normal .vimrc file. I may dig more into that in the future, but the next step is to see how well Python plays on Windows compared with on Linux/Mac.