Vim Tips Wiki
Advertisement
Tip 420 Printable Monobook Previous Next

created February 10, 2003 · complexity basic · author garbageman · version 6.0


If you also get annoyed by the menu bar and/or tool bar in the gui version of vim, you can get rid of them with the following:

set guioptions-=m " to get rid of the menu bar
set go-=T " to get rid of the tool bar

and then you're back to the look and feel of how vim should always be.

Comments

Of course you can also put them back with

set guioptions += ...

VimTip89 was also on this very subject. I also prefer to have more screen real estate, but, sometimes want the menus handy, so, to reiterate what I posted to that tip, here are some function keys to toggle the menu and tool bars:

set guioptions-=T "get rid of toolbar
:let g:toggleTool = 0
map <silent> <F2> :if g:toggleTool == 1<CR>:set guioptions-=T<CR>:let g:toggleTool = 0<CR>:else<CR>:set guioptions+=T<CR>:let g:toggleTool = 1<CR>:endif<CR>
"
set guioptions-=m "get rid of menu
:let g:toggleMenu = 0
map <silent> <F1> :if g:toggleMenu == 1<CR>:set guioptions-=m<CR>:let g:toggleMenu = 0<CR>:else<CR>:set guioptions+=m<CR>:let g:toggleMenu = 1<CR>:endif<CR>

Advertisement