No GUI menus

11 views
Skip to first unread message

Tony Mechelynck

unread,
May 17, 2020, 8:17:23 PM5/17/20
to vim_dev
Suddenly I notice the menu on top of my gvim screen has disappeared.
(The toolbar is still there with its icons and their menus. The popup
menu also appears on right-click. Only the main menu is gone.)

Don't know if it's the fact of compiling with GTK3 instead of GTK2, ot
of switching from KDE Plasma to Gnome window manager; maybe it's both.
(Plasma is unstable in openSUSE 15.2 beta with the settings I had.)

Workaround: the lines marked → in the snippet below (from my vimrc)
were moved out of the "if !has('gui_running')" block. Now I have a
keyboard-activated menu (with Toolbar. and Popup. before File. and
DrChip. between Window. and Help.) on the statusbar by hitting F10,
even in gvim. (The space between :emenu and <C-Z> is important.)

if has('wildmenu')
set wildmenu
if exists('+wildmode')
set wildmode=longest:full,full
endif
→ set wildcharm=<C-Z>
→ map <F10> :emenu <C-Z>
→ imap <F10> <C-O>:emenu <C-Z>
if !has('gui_running')
runtime! menu.vim
endif " !has('gui_running')
endif " 'wildmenu'

Best regards,
Tony.
Reply all
Reply to author
Forward
0 new messages