* Christopher <[email protected]> [260319 19:14]:
> On Thu, Mar 19, 2026 at 9:45 AM Marvin Renich <[email protected]> wrote: 
> > The user's vimrc file _must_ be one of the files listed above, unless 
> > you specify the -u option. The only way to specify the vimrc file in an 
> > environment variable is to export VIMINT="source /path/to/your/vimrc" 
> > before (or while) starting vim.  
> 
> You mention, the only way to specify a vimrc in a environment variable; I 
> assume as in $MYVIMRC is to export VIMNT which is the source of your vimrc 
> file. If my vimrc file was located in the system path then that would be;
> VIMINT=`/etc/vimrc and that would create the environment variable $MYVIMRC 
> ? 

You need to read carefully and for exact syntax and content:

> > environment variable is to export VIMINT="source /path/to/your/vimrc" 
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Remember that VIMINIT specifies an ex command to execute, not a file
name.  If you want to source a file using VIMINIT, you must specify the
source command itself, not just the file name.

Also, when testing this, know that :scriptnames is your friend.

Also note that if your vimrc file is the system vimrc file (/etc/vimrc
on some distributions, /etc/vim/vimrc on Debian), it is sufficient to
use:

  VIMINIT=':' vim

or

  export VIMINIT=':'
  vim

as the system vimrc is sourced even if you specify a VIMINIT.  Setting
VIMINIT=':' simply disables reading of the user vimrc file, but not the
system vimrc file.  (':' is an empty ex command.)

Finally, if you specify VIMINIT, MYVIMRC is _not_ set by vim.

...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/abyYWCKoex7z/GPU%40basil.wdw.

Reply via email to