Vim logo vim online Vim Book Ad

basic Tip #259: removing the toolbar (icons) from gvim

 tip karma   Rating 12/9, Viewed by 581 

created:   June 12, 2002 18:52      complexity:   basic
author:   Ali Rizvi      as of Vim:   6.0

Change good or bad usually  encounters interia from people in excepting it.
gvim 6.0 is the first version that introduced the icons shortcut in shape of a toolbar under the menu.
when we upgraded to the new and improved vim 6.1 from vim 5.7 some of people in our company encountered some problems with their syntax highlighting
and some of them objected on the new toolbar which displayed icons for some common tasks for people more used to GUI.

I finally figured out how to remove this new feature since I also didn't see much use for it

Here is for all those who haven't figured it out yet

In your .gvimrc include the following two lines

unmenu ToolBar
unmenu! ToolBar

Doing this from an open gvim does not remove them but grays them out but doing from gvimrc does the job

I was also trying to remove the menus at the top and almost succeeded with a similar technique but somehow the Buffer menu item stays there no matter what. IMHO it is a bug but it could very well be a feature ;)

I tried this

unmenu *
unmenu! *

even added this line after the above two but didn't help
unmenu Buffers

I hope this benefits you all as much as I have benefitted from all your tips

 rate this tip  Life Changing Helpful Unfulfilling 

<<how long is the current word? | gvim-->mouse-->popup menu >>

Additional Notes

[email protected], June 12, 2002 19:13
So how about just doing the following:

:set guioptions-=T

This causes the toolbar to not show.  (This is how I have it.)
[email protected], June 12, 2002 19:15
Similarly,

:set guioptions-=m

or -=M (more extreme solution, I think) works quite well for hiding the menus.

Perhaps a more general :help 'guioptions' should be suggested?  *grin*
[email protected], July 29, 2002 13:19
As I posted in another thread on hiding the toolbar, this will make the toolbar/menu toggleable:

set guioptions-=T "get rid of toolbar
:let g:toggleTool = 0
map <silent> <S-F1> :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> <S-F2> :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>

Tom Kimpton
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo