Wednesday, April 6, 2011

Re: menu.vim overwritten

On Apr 7, 3:09 am, John Little <john.b.lit...@gmail.com> wrote:
> On Apr 6, 2:59 am, rameo <rai...@gmail.com> wrote:
>
> > When I install a new vim version, the installer asks if it has to
> > create a new _vimrc file but it doesn't so for menu.vim.
> > Last time my menu.vim was overwritten.
>
> What I do is:
>     - In .vimrc (or _vimrc) near the beginning I have
>
>         let did_install_default_menus = 4
>
>     - I have my menu.vim in vimfiles or .vim (early in the runtimepath
> option).
>     - In .gvimrc or _gvimrc I have
>
>         if did_install_default_menus == 4
>             "default menu.vim was suppressed
>             unlet did_install_default_menus
>             runtime menu.vim
>         endif
>
> What's not good about my approach is that whenever there's a new
> version of menu.vim I merge it with my changes, a tedious task, to
> avoid fossilization.  However, only once or twice were there many
> changes.
>
> Regards, John

John,

I added a _gvimrc (never used a _gvimrc before) with:

if did_install_default_menus == 4
"default menu.vim was suppressed
unlet did_install_default_menus
runtime menu.vim
endif

and added the line:
let did_install_default_menus = 4
to _vimrc

and moved my menu.vim to vimfiles (root) but received this error:

Error detected while processing C:\Program Files\Vim
\vim73\filetype.vim:

line 2516:
E484: Can't open file C:\Program Files\Vim\vim73\menu.vim.
Error detected while processing C:/Program Files/Vim/vimfiles/
menu.vim:

line 3407:
E329: No menu "&Tools"

What do you mean by "early in the runtimepath option"?

--
You received this message from the "vim_use" 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

No comments: