
In your .vimrc file, add the following lines.
"Toggle Menu and Toolbar
set guioptions-=m
set guioptions-=T
map <silent> <F2> :if &guioptions =~# 'T' <Bar>
\set guioptions-=T <Bar>
\set guioptions-=m <bar>
\else <Bar>
\set guioptions+=T <Bar>
\set guioptions+=m <Bar>
\endif<CR>
The next time you use GVim, it will automatically hide the menu bar. And you can use F2 to recall it and hide it again.

Note that you can change the second and third lines to the following(with a "+" sign), and GVim will start with a menu bar and you still can toggle with F2 key.
set guioptions+=m
set guioptions+=T
3 comments:
Thanks.
Thanks!
Thank you!!
Post a Comment