Re: $VIMRC over .vimrc ?

Igbanam Ogbuluijah <[email protected]> Thu, 19 Mar 2026 07:00:48 +0000
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
On Wed, Mar 18, 2026 at 10:12:49PM +0000, Gary Johnson wrote:
> On 2026-03-18, Eric Marceau wrote:
> > I did a little experiment:
>=20
> [...]
>=20
> I did something similar with terminal vim.  I set MYVIMRC directly
> in my environment and set it in VIMINIT, also in my environment,
> before starting vim.  In all cases, I could see both environment
> variables within vim and in the environment after shelling out of
> vim, but in no case was there any evidence of those variables
> affecting the vimrc sourced by vim at startup.  The $MYVIMRC file
> did not appear in the output of :scriptnames and none of the
> settings made in that file were set in vim.  The only vimrc sourced
> was the system vimrc, /etc/vim/vimrc on Ubuntu.
>=20
> It does seem like something is broken, because from vim's
> documentation, I would have expected the file specified by MYVIMRC
> to have been sourced.
>=20
> Regards,
> Gary
>=20
> --=20
> --=20
> 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
>=20
> ---=20
> 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/2=
0260319051249.GC10946%40phoenix.

It's not that something's broken; but there definitely is some
misconception.

What I think is going on is=E2=80=A6

1. The top two places Vim searches for configuration are
  a. a VIMINIT environment variable
  b. Some VIMRC file
2. You can set an environment variable, VIMINIT; it  should have Ex
commands in it.
3. If there's no VIMINIT, Vim searches some predefined paths to set
VIMRC.

I don't think VIMRC is an env variable Vim respects; I think it's an env
variable it sets based on where it finds a vimrc file.


~ Igbanam

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

---=20
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 e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/abu=
eMbC-XowVrZUv%40Edgar.local.