(Move categories to tip template) |
(Move categories to tip template) |
||
Line 1: | Line 1: | ||
{{review}} |
{{review}} |
||
{{TipImported |
{{TipImported |
||
− | |id= |
+ | |id=665 |
− | |previous= |
+ | |previous=663 |
− | |next= |
+ | |next=667 |
− | |created=February |
+ | |created=February 27, 2004 |
|complexity=basic |
|complexity=basic |
||
− | |author= |
+ | |author=D. Bron |
− | |version= |
+ | |version=5.7 |
− | |rating= |
+ | |rating=26/14 |
|category1= |
|category1= |
||
|category2= |
|category2= |
||
}} |
}} |
||
− | If you |
+ | If you like your GUI clean, but want the option to access all its power, then you might like this tip. |
+ | |||
− | of them with the following: |
||
+ | The variable "guioptions" determines what GUI widgets are visible (see {{help|'guioptions'}}). I personally prefer to have as few widgets visible as possible, until I need them. To that end, I have the following in my vimrc: |
||
<pre> |
<pre> |
||
+ | " Turn off useless toolbar |
||
− | set guioptions-=m " to get rid of the menu bar |
||
⚫ | |||
− | set go-=T " to get rid of the tool bar |
||
− | </pre> |
||
+ | " Turn off menu bar (toggle with CTRL+F11) |
||
− | and then you're back to the look and feel of how vim should always be. |
||
⚫ | |||
+ | " Turn off right-hand scroll-bar (toggle with CTRL+F7) |
||
⚫ | |||
⚫ | |||
− | Of course you can also put them back with |
||
+ | " CTRL+F11 to toggle the menu bar |
||
⚫ | |||
+ | nmap <C-F11> :if &guioptions=~'m' \| set guioptions-=m \| else \| set guioptions+=m \| endif<cr> |
||
+ | " CTRL+F7 to toggle the right-hand scroll bar |
||
− | ---- |
||
+ | nmap <C-F7> :if &guioptions=~'r' \| set guioptions-=r \| else \| set guioptions+=r \| endif<cr> |
||
− | [[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: |
||
− | |||
− | <pre> |
||
⚫ | |||
− | :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> |
||
− | " |
||
⚫ | |||
− | :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> |
||
</pre> |
</pre> |
||
+ | |||
+ | Opera browser users will find the key bindings familiar. |
||
+ | |||
⚫ | |||
---- |
---- |
Revision as of 04:07, 25 April 2008
Tip 665 Printable Monobook Previous Next
created February 27, 2004 · complexity basic · author D. Bron · version 5.7
If you like your GUI clean, but want the option to access all its power, then you might like this tip.
The variable "guioptions" determines what GUI widgets are visible (see :help 'guioptions'). I personally prefer to have as few widgets visible as possible, until I need them. To that end, I have the following in my vimrc:
" Turn off useless toolbar set guioptions-=T " Turn off menu bar (toggle with CTRL+F11) set guioptions-=m " Turn off right-hand scroll-bar (toggle with CTRL+F7) set guioptions-=r " CTRL+F11 to toggle the menu bar nmap <C-F11> :if &guioptions=~'m' \| set guioptions-=m \| else \| set guioptions+=m \| endif<cr> " CTRL+F7 to toggle the right-hand scroll bar nmap <C-F7> :if &guioptions=~'r' \| set guioptions-=r \| else \| set guioptions+=r \| endif<cr>
Opera browser users will find the key bindings familiar.