After some messing around, I thought I’d share a fix I’ve found for a problem I’ve been having with gvim on my home Linux machine.
Basically, the issue was that gvim would be missing the menu bar. My guioptions had “m” (display menubar) enabled, and $VIMRUNTIME/menu.vim was being sourced. No matter what I tried, the menu bar stayed hidden – it had vanished, and I couldn’t tell why. After some searching with various combinations of “gvim menu vanished” and similar, I finally ran across the solution…
It turns out that there is a configuration file in your home directory that controls some elements of visual display under GNOME. The directory I’m talking about is ~/.gnome2, under which there are a number of file. After editing ~/.gnome2/Vim, I noticed that it contained:
[Placement]
Dock=Toolbar\\0,0,0,0\\Menubar\\0,0,0,0
which looks fairly sensible, if incomprehensible. According to the post I found, however, it should contain this:
[Placement]
Dock=Toolbar\\0,1,0,0\\Menubar\\0,0,0,0
After making that change and restarting gvim, all is well once again. Anyone’s guess as to why.

This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.
Thank you! Had the same problem myself.
Thank you very much. Just had this problem today for no reason whatsoever. Have been running gvim for years.
What did I do before the internet?
Thanks! Wierd one, just started out of nowhere. Your solution fixed it.
thanks! this fixed my problem too using kubuntu hardy
they should put this in their faq perhaps
This solution is still working. Thanks!
I hope I can remember this when it happens again.
I’m glad this solution still helps people — and if you forget, this post will still be here