Search notes:
VIM: runtime/menu.vim
A general prerequisite for using menu.vim is that FEAT_MENU is defined.
$VIMRUNTIME/menu.vim is (also?) sourced if
:filetype on is executed in vim with a GUI.
This file is not sourced if
M is included in
guioptions. Apparently, otherwise,
even if using
-U NONE -u NONE,
menu.vim would be sourced.
The path of
menu.vim is stored in the macro
SYS_MENU_FILE which is defined in one of the
os_*.h file, for example in
os_dos.h:
#ifdef FEAT_GUI
…
# ifndef SYS_MENU_FILE
# define SYS_MENU_FILE "$VIMRUNTIME\\menu.vim"
# endif
#endif
See also
The FEAT_MENU macro.