1

When I start gvim without rc file (gvim -i NONE -u NONE -U NONE), gvim still reads $VIMRUNTIME/menu.vim. I am looking for a way to prevent gvim from doing exactly that.

In fact, :help -U explicitely states

-U {gvimrc} [...]
        Exception: Reading the system-wide menu file is always done.
        [...]

Do I have to interpret this exception such that there is really no way to start gvim without the menu.vim?

5
  • I just make the file empty on packaging Vim (removing it causes errors). But now opened :help menu.vim and it mentions :let did_install_default_menus = 1 and :let did_install_syntax_menu = 1, did you try setting them?
    – xaizek
    Commented Nov 20, 2016 at 15:16
  • In order to set these variables, I'd need an rc file to assign the respective values. But, by using -U NONE and -u NONE I explicitely state to not use any rc file Commented Nov 20, 2016 at 15:19
  • You can try setting them via --cmd (not -c or + probably) command-line switch.
    – xaizek
    Commented Nov 20, 2016 at 15:21
  • This did indeed do the trick. But I am still having the illusion, that there is a more easy way for this. Commented Nov 20, 2016 at 15:45
  • :help 'guioptions'
    – romainl
    Commented Nov 20, 2016 at 15:48

1 Answer 1

1

You can prevent loading the menu by setting the 'go' option.

Excerpt from my .vimrc:

" don't want any menus, just an term like gvim
" needs to come first, because :syn on and :filetype
" would else load the system menu
set go=M
6
  • You might want to add the --cmd thingy so that I can accept your answer. Commented Nov 20, 2016 at 17:59
  • I think the reader can figure it out by themselves :) Commented Nov 21, 2016 at 12:37
  • I for one couldn't. Commented Nov 21, 2016 at 13:21
  • I don't understand. You know --cmd and you know the option name and setting. What exactly do you have problems with finding out? Commented Nov 21, 2016 at 17:01
  • 1
    I believe the OP means that they didn't know about the --cmd option when they first read your answer, and thus couldn't figure out how to apply the change until someone else told them about the --cmd option. Therefore, they believe having it in the answer would be helpful (not to solve their problem, but for future readers).
    – Rich
    Commented Dec 21, 2016 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.