On Wed, Jul 27, 2016 at 8:00 PM, Gary Johnson <garyj...@spocom.com> wrote:
> On 2016-07-27, Tony Mechelynck wrote:
>> On Wed, Jul 27, 2016 at 4:43 PM, Gary Johnson wrote:
>> > On 2016-07-27, Manuel Ortega wrote:
>> >
>> >> If "syntax on" is in the system vimrc as proposed, then I can't seem to 
>> >> find
>> >> any way *at all* to disable the loading of the system menu.vim (short of
>> >> unacceptable hacks like bash-aliasing 'vim' to 'vim -u ~/.vimrc'.)
>> >
>> > How about "sudo rm /usr/share/vim/vimrc"?
>> >
>> > Another, less drastic way would be to create a file,
>> > ~/.vim/ftdetect/guioptions.vim, containing this:
>> >
>> >     set guioptions+=M
>> >
>> > Regards,
>> > Gary
>>
>> That ftdetect/guioptions.vim would, with current Vim, be sourced from
>> $VIMRUNTIME/filetype.vim (at current line 2730, near the end), i.e.
>> only _after_ filetype detection has been set, which is too late for
>> clearing menus, unless you first set ":filetype off". But then you
>> would have to run ":filetype on" afterwards _only_ if it was
>> originally on.
>
> Apparently that's not true:  it's not too late.
>
> Here are the initial lines from :scriptnames:
>
>       1: ~/.vimrc
>       2: ~/.vim/filetype.vim
>       3: /usr/local/share/vim/vim74/filetype.vim
>       4: ~/.vim/ftdetect/csv.vim
>       5: ~/.vim/ftdetect/mediawiki.vim
>       6: /usr/local/share/vim/vim74/menu.vim
>       7: /usr/local/share/vim/vim74/autoload/paste.vim
>       8: /usr/local/share/vim/vim74/ftplugin.vim
>       9: /usr/local/share/vim/vim74/indent.vim
>      10: /usr/local/share/vim/vim74/syntax/manual.vim
>      11: /usr/local/share/vim/vim74/syntax/synload.vim
>      12: /usr/local/share/vim/vim74/syntax/syncolor.vim
>
> You can see that the files in ~/.vim/ftdetect are sourced before
> menu.vim, and in fact are sourced before the decision to source
> menu.vim is made.  I verified that putting "set guioptions+=M" into
> ~/.vim/ftdetect/guioptions.vim would work before posting that
> solution.
>
> Regards,
> Gary

Oops, you're right, it is just in time, but barely.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui