gf on options.c in README.txt took me to
- options.c:vimrc_found() called when vimrc or VIMIINIT environment variable is found.
So in theory, vim can read whatever the value of VIMINIT is set to. But typically this is one of .vimrc, .gvimrc, _vimrc or _gvimrc depending on the platform.
- lid -Sn VIMINIT lists: main.c, options.txt,starting.txt,versoin5.txt
- vim main.c
- main.c:command_line_scan(paramp) can affect this since case 'u' or case 'U' can specify an init file.
- from examining main.c: .exrc or _exrc, or value of EXINIT can also be used.
One neat feature is that if either vimrc or exrc are not owned by the calling user, 'secure' mode is set. Using :h secure in vim tells us:
"When on, ":autocmd", shell and write commands are not allowed in ".vimrc" and ".exrc" in the current directory and map commands are displayed."