* Gary Johnson <[email protected]> [260319 09:04]:
> That's what I used to think, too, was that MYVIMRC was set, but not
> read, by Vim.  But ":help MYVIMRC" says this:
> 
>                       *$MYVIMRC* *$MYVIMDIR*
>      c. Five places are searched for initializations.  The first that exists
>       is used, the others are ignored.  The `$MYVIMRC` environment variable is
>       set to the file that was first found, unless `$MYVIMRC` was already set
>       when using VIMINIT.  ...
> 
> It's that "unless `$MYVIMRC was already set" that I don't understand
> the meaning of.  That suggests to me if $MYVIMRC is already set, Vim
> uses that value instead of looking further for the file.
> 
> In my experiments, I executed
> 
>     VIMINIT='let $MYVIMRC="/path/to/a/vimrc"' vim
> 
> expecting Vim to source /path/to/a/vimrc, but it didn't.  I'm OK
> with the actual behavior, but I don't think the documentation is
> clear.

Christian's interpretation is how I also interpret this, and it is
empirically corroborated.

Everyone seems to quote the help as saying "unless `$MYVIMRC` was
already set when using VIMINIT."

However, my vim (9.0.0135 which is several years old) has the word
"and", and there are no backticks around $MYVIMRC:  "unless $MYVIMRC was
already set and when using VIMINIT."

Perhaps the word "and" was inadvertently dropped when editing this
(perhaps to add the backticks)?

...Marvin

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/abwEpIDJzvUe/ou1%40basil.wdw.

Reply via email to