Vim Tips Wiki

Restore missing gvim menu bar under GNOME

Revision as of 12:36, July 15, 2012 by JohnBot (Talk | contribs)

1,619pages on
this wiki
Tip 1677 Printable Monobook Previous Next

created September 8, 2011 · complexity basic · version 7.0

What to do if Vim's menu bar disappears due to a bug in GNOME, so that gvim cannot display its menu?

Changing guioptions

The standard method for displaying or hiding the menu bar is to use these commands in gvim:

  • :set guioptions+=m   enable (display) menu bar
  • :set guioptions-=m   disable (hide) menu bar

If you are using Gnome/Metacity, a problem may prevent the menu bar from being displayed: Gnome tries to dock the menu in a place where you cannot see it. A test to see if this is the issue is to open gvim as root (with sudo gvim), then see if the menu can be enabled and disabled using the above commands.


Open a terminal and enter the command:

rm ~/.gnome2/Vim


rm ~/.gnome/Vim

That is, delete the file under your home directory where Gnome keeps its settings for Vim. It will be recreated when you run gvim again. With luck, the menu will be displayed again.


Deleting the file ~/.gnome2/Vim worked, but the problem recurs. Examining this file shows that the problem is that the toolbar and the menubar are overlayed:


Change this to:


This solves the problem. The question however remains, namely how does this file get repeatedly corrupted in the first place. --December 29, 2011

Around Wikia's network

Random Wiki