How to get global application menu for gvim?
Solution 1: Make the global menu for gvim work
To get global menu for gvim and to get rid of the warning message, add this to ~/.bashrc and restart the terminal:
function gvim () { (/usr/bin/gvim -f "$@" &) }
Solution 2: Disable global menu for gvim
To just get rid of the warning message, you can disable the global menu, at least for gvim:
-
How do I enable or disable the global application menu?
- Answer #133005 - Several options for how to disable the global menu
For example, add this to ~/.bashrc and restart the terminal:
alias gvim='UBUNTU_MENUPROXY= gvim'
References
- https://bugs.launchpad.net/ubuntu/+source/vim/+bug/972968
- https://bugs.launchpad.net/ubuntu/+source/vim/+bug/776499
- https://bugs.launchpad.net/ubuntu/+source/vim/+bug/987707
- https://askubuntu.com/a/132581
There is a workaround here: https://bugs.launchpad.net/ubuntu/+source/vim/+bug/776499
Create an alias at the top of your shell init file (e.g. ~/.bashrc):
alias gvim="UBUNTU_MENUPROXY=0 gvim"
My Ubuntu 12.04 amd64 can work with gvim -f
.
- vim-gnome: 2:7.3.429-2ubuntu2.1+aptbuild1
- terminator: 0.96-0ubuntu1+aptbuild1
- guake: 0.4.2-7+aptbuild1
I can add the -f
(--nofork
) option when start gvim
:
alias gvim="gvim -f"
This only works for gvim
.firefox
and others don't have this -f
option.