On 9/28/09 6:06 PM, Matt Wozniski wrote:
>
> On Mon, Sep 28, 2009 at 5:16 PM, Robert H wrote:
>>
>> On 9/27/09 9:04 PM, pansz wrote:
>>>
>>> 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.
>>>
>>
>> I have probably never had an issue because I always launch the one I
>> want. I don't move from one to the other.
>
> Even so, some settings (like t_vb) must be set from either a .gvimrc
> or from a GuiEnter autocmd. If they're set from .vimrc, they are
> silently reset to their original value when gvim is started. So the
> only right ways to do it, for all options, is either with a .gvimrc
> file or with GuiEnter autocmds.
>
There must be a lot of wrong wayers out there. Every example .vimrc that
I have seen that has a gui section does not prepend GuiEnter onto the
settings.
Since this is all I am doing:
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
Do I really need more than that GUIEnter? If I do then how does that
change the above? Do I have multiple GUIEnter * set ... commands?
Bob
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---