>> Anyway, I just tested putting "finish" in the first line
>> of /usr/share/vim/vim73/menu.vim, and that did the trick.
>
> There is a simpler way which won't be invalidated after Vim update. I
> have "set guioptions-=m guioptions+=M guioptions-=T" as one of the the
> first lines in my .vimrc (not .gvimrc!). This removes all toolbars and
> menus completely.
The key part of that is that the guioptions+=M needs to happen **in
.vimrc**. Oy. Gory details at :help .gvimrc
So, GUI-specific options except for the 'f' and 'M' option flags of
guioptions should go into .gvimrc, but guioptions+=M and/or +=f needs to
be in .vimrc? What's the logic behind running $VIMRUNTIME/menu.vim
before .gvimrc is sourced?
And why does this only affect the GTK2-GNOME GUI? Shouldn't the GTK GUI
behave the same? (Tested under Vim versions 7.1.314 and 7.3.35 with
GTK2-GNOME vs GTK GUIs on Debian.)
Further, the net effect of go+=M isn't the same as explicitly resetting
tb= after the GUI is up. With the 'add M in .vimrc' setup:
.vimrc: se go+=M
The menu still appears as a 3-4 pixel tearoff bar, and to "reset" it
requires: :runtime menu.vim
With the "do what I mean, except that tb= doesn't work" approach:
.gvimrc: se go=aegiLt
(then some time after startup): :se tb=
The menu is completely absent. But, it's easily restored by setting
tb=text
So, to John: I'd recommend keeping your .gvimrc exactly as you had it,
except wrapping the 'set tb=' command in the GUIEnter autocmd:
==> .gvimrc <==
set vb t_vb=
set showcmd
set guioptions=aegiLt
au GUIEnter * set tb=
===============
This is both futureproof, in that it doesn't require modifying anything
distributed with Vim, which Sergey rightly points out will be
overwritten when upgrading Vim. And it keeps all of your GUI-related
options in one place. (And it works in both vim-gnome and vim-gtk, but
I'm guessing that's not very important to you.)
--
Best,
Ben
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment