Robert H 写道:
> if has("gui_running")
>      set guioptions+=acegtm
>      set guioptions-=T
>      set guifont=Menlo:12
>      set lines=50
>      set columns=100
>      set mouse=a
>      autocmd GUIEnter * set vb t_vb=
>      colorscheme desert
> endif

To be bug-free you must use the autocmd GUI Enter to do all .gvimrc 
related stuffs.

reason:
1. you can switch from console vim to gvim with the command :gui
2. some options and settings are reset when starting the gui.

in this case:
a. .vimrc are source *without* "gui_running" defined
b. some of the options are reset
c. GUIEnter event and .gvimrc are sourced

so you should not rely on "gui_running" to do gui-related stuffs.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to