How to hide the menu/tool bar of gvim?

前端 未结 7 802
刺人心
刺人心 2020-12-12 18:42

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.

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 19:45

    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  :call ToggleGUICruft()
    
    " 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.

提交回复
热议问题