On 2006-10-05, Bill McCarthy <[EMAIL PROTECTED]> wrote: > On Thu 5-Oct-06 8:54pm -0600, Gary Johnson wrote: > > > > On 2006-10-06, Peter Hodge <[EMAIL PROTECTED]> wrote: > >> > BTW, using > >> > > >> > gvim -u NONE -U NONE > >> > > >> > is both redundant (in the case of -U NONE), dangerous (since > >> > default settings may truncate your viminfo on exit), and put > >> > you in vi compatible mode. Better is: > >> > > >> > gvim -u NONE -i NONE -N > >> > > >> > >> I wouldn't think the -i option is necessary, because 'viminfo' is > >> empty by default anyway. Perhaps there should be a shell script > >> distributed with vim so that anyone can start up vim cleanly. > >> > >> cleanvim.sh: > >> vim -u NONE -i NONE -N --noplugin --cmd 'set rtp=$VIMRUNTIME' '+set > >> rtp&' > >> > >> cleanvim.bat: > >> gvim.exe -u NONE -i NONE -N --noplugin --cmd "set rtp=$VIMRUNTIME" > >> "+set rtp&" > > > > Setting "-u NONE -i NONE -N" is all that's needed. See ":help -u". > > > > When {vimrc} is equal to "NONE" (all uppercase), all > > initializations from files and environment variables are > > skipped, including reading the |gvimrc| file when the GUI > > starts. Loading plugins is also skipped. > > > > The viminfo file may be empty initially, but it probably is not once > > vim has been run. > > Gary, the reason I use and suggested > > --cmd "se rtp=$VIMRUNTIME" > > is to prevent customizations such as adding all of your > colorschemes, compilers, etc. in the Gvim menus, custom > icons, etc. --cmd happens before menu.vim is sourced. > > The reason I use: > > "+se rtp&" > > is to have 'rtp' set as by default but without the side > effects mentioned above. > > :h startup > > For "fun" start with the above but without the --cmd above > but add -V99nocmd. Then include the --cmd above and with > -V99wcmd. Finally do a vimdiff on nocmd and wcmd.
Well, I stand corrected. Thanks for explaining that. I was sure that "-u NONE -i NONE -N" was as sufficient for gvim as it is for vim. I had no idea that gvim was so insistent on loading certain files. Sure enough, under ":help -U" it says: Exception: Reading the system-wide menu file is always done. But unfortunately it doesn't go on to say that this implies that 'rtp' will be searched for certain other files, e.g., autoload/paste.vim. I also found this under ":help gui-init": To skip loading the system menu include 'M' in 'guioptions'. So to avoid loading _anything_, at the expense of not having any menus, one could start gvim as gvim -N -u NONE -i NONE --cmd 'set go+=M' Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA