But most of the time, the reason why people use GVim or Vim is that they don't need to use mouse - the powerful keyboard shortcut is enough for an efficient editing. So it seems like a waste of space to have this menu and tools bar. Here I will introduce a tip to hide the menu and a keyboard shortcut to recall it.
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