Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide the menu/tool bar of gvim?

Tags:

vim

I don't have use for the menu and tools bars in gvim on Windows; Can I hide them?

This will give more space to the text area.

enter image description here

like image 592
zdd Avatar asked Nov 23 '12 08:11

zdd


People also ask

How to remove toolbar in gVim?

Use the guioptions setting (abbreviated as go). Removes the menu bar. Removes the toolbar. Abbreviation for guioptions is go , so :set go+=m works also.

How do I get gVim to open full screen?

If you are staring gVim from a shortcut, such as from the Start Menu or Desktop, you can change the shortcut properties to start Vim maximized. Right-click the shortcut, choose Properties, and select Maximized from the Run drop-down list.


4 Answers

Use the guioptions setting (abbreviated as go).

:set guioptions -=m 

Removes the menu bar.

:set guioptions -=T

Removes the toolbar.

My reference

like image 164
hd1 Avatar answered Nov 05 '22 09:11

hd1


you can hide it by typing these command in your .vimrc

set guioptions-=m  "menu bar
set guioptions-=T  "toolbar
set guioptions-=r  "scrollbar
like image 26
phschoen Avatar answered Nov 05 '22 11:11

phschoen


I have the following code in my .vimrc : by default the bar is hidden, but if I want to display it I can use F11 to toggle between the two modes.

function! ToggleGUICruft()
  if &guioptions=='i'
    exec('set guioptions=imTrL')
  else
    exec('set guioptions=i')
  endif
endfunction

map <F11> <Esc>:call ToggleGUICruft()<cr>

" by default, hide gui menus
set guioptions=i

Removing mTrl hides the window menu bar, task bar and right scroll bar, it is kind of a Gvim fullscreen mode. See :help guioptions for more information and customization.

PS : it is important to keep i in your guioptions, otherwise the Vim Icon is not displayed in AltTAB and task bar.

like image 24
Xavier T. Avatar answered Nov 05 '22 10:11

Xavier T.


You can select Edit -> Global settings -> Toggle toolbar. This hides toolbar until you restart VIM. Then, enter :set. Vim prompt you list of different options, find line containing guioptions. This is what you need to add to .vimrc file to sustain this appearance.

This method can be used if you don't know option name but know how to change it through main menu.

like image 5
Evgeny Lazin Avatar answered Nov 05 '22 11:11

Evgeny Lazin