Re: $VIMRC over .vimrc ?
Christopher <[email protected]> Fri, 20 Mar 2026 06:58:13 -0700 (PDT)
| Newsgroups | gmane.editors.vim |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_118912_882945117.1774015093635 Content-Type: multipart/alternative; boundary="----=_Part_118913_1287139796.1774015093635" ------=_Part_118913_1287139796.1774015093635 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, March 19, 2026 at 8:44:22=E2=80=AFPM UTC-4 Marvin Renich wrote= : * Christopher <[email protected]> [260319 19:14]:=20 > On Thu, Mar 19, 2026 at 9:45=E2=80=AFAM Marvin Renich <[email protected]> = wrote:=20 > > The user's vimrc file _must_ be one of the files listed above, unless= =20 > > you specify the -u option. The only way to specify the vimrc file in an= =20 > > environment variable is to export VIMINT=3D"source /path/to/your/vimrc"= =20 > > before (or while) starting vim.=20 >=20 > You mention, the only way to specify a vimrc in a environment variable; I= =20 > assume as in $MYVIMRC is to export VIMNT which is the source of your=20 vimrc=20 > file. If my vimrc file was located in the system path then that would be;= =20 > VIMINT=3D`/etc/vimrc and that would create the environment variable=20 $MYVIMRC=20 > ?=20 You need to read carefully and for exact syntax and content:=20 > > environment variable is to export VIMINT=3D"source /path/to/your/vimrc"= =20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^=20 Remember that VIMINIT specifies an ex command to execute, not a file=20 name. If you want to source a file using VIMINIT, you must specify the=20 source command itself, not just the file name.=20 Also, when testing this, know that :scriptnames is your friend.=20 Also note that if your vimrc file is the system vimrc file (/etc/vimrc=20 on some distributions, /etc/vim/vimrc on Debian), it is sufficient to=20 use:=20 VIMINIT=3D':' vim=20 or=20 export VIMINIT=3D':'=20 vim=20 as the system vimrc is sourced even if you specify a VIMINIT. Setting=20 VIMINIT=3D':' simply disables reading of the user vimrc file, but not the= =20 system vimrc file. (':' is an empty ex command.)=20 Finally, if you specify VIMINIT, MYVIMRC is _not_ set by vim.=20 ...Marvin=20 What do you mean by :scriptnames ? Within vim I run the command; VIMIT=3D: (colon) and that takes my system=20 vimrc assigns it the variable $MYVIMRC or that has to be done after ?=20 =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 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/93a= 47316-1060-4434-b330-d8b8b72e6595n%40googlegroups.com. ------=_Part_118913_1287139796.1774015093635 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <br /><br /><div><div dir=3D"auto">On Thursday, March 19, 2026 at 8:44:22= =E2=80=AFPM UTC-4 Marvin Renich wrote:<br /></div><blockquote style=3D"marg= in: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-l= eft: 1ex;">* Christopher <<a href=3D"" rel=3D"nofollow">crestchr...@gmai= l.com</a>> [260319 19:14]: <br />> On Thu, Mar 19, 2026 at 9:45=E2=80=AFAM Marvin Renich <<a hre= f=3D"" rel=3D"nofollow">[email protected]</a>> wrote:=20 <br />> > The user's vimrc file _must_ be one of the files listed abo= ve, unless=20 <br />> > you specify the -u option. The only way to specify the vimr= c file in an=20 <br />> > environment variable is to export VIMINT=3D"source /path/to= /your/vimrc"=20 <br />> > before (or while) starting vim. =20 <br />>=20 <br />> You mention, the only way to specify a vimrc in a environment va= riable; I=20 <br />> assume as in $MYVIMRC is to export VIMNT which is the source of = your vimrc=20 <br />> file. If my vimrc file was located in the system path then that = would be; <br />> VIMINT=3D`/etc/vimrc and that would create the environment varia= ble $MYVIMRC=20 <br />> ?=20 <br /> <br />You need to read carefully and for exact syntax and content: <br /> <br />> > environment variable is to export VIMINT=3D"source /path/to= /your/vimrc"=20 <br /> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^ <br /> <br />Remember that VIMINIT specifies an ex command to execute, not a file <br />name. If you want to source a file using VIMINIT, you must specify t= he <br />source command itself, not just the file name. <br /> <br />Also, when testing this, know that :scriptnames is your friend. <br /> <br />Also note that if your vimrc file is the system vimrc file (/etc/vimr= c <br />on some distributions, /etc/vim/vimrc on Debian), it is sufficient to <br />use: <br /> <br /> VIMINIT=3D':' vim <br /> <br />or <br /> <br /> export VIMINIT=3D':' <br /> vim <br /> <br />as the system vimrc is sourced even if you specify a VIMINIT. Settin= g <br />VIMINIT=3D':' simply disables reading of the user vimrc file, but not= the <br />system vimrc file. (':' is an empty ex command.) <br /> <br />Finally, if you specify VIMINIT, MYVIMRC is _not_ set by vim. <br /> <br />...Marvin <br /></blockquote><div><br /></div><div>What do you mean by :scriptnames ?= <br /><br />Within vim I run the command; VIMIT=3D: (colon) and that takes = my system vimrc assigns it the variable $MYVIMRC or that has to be done aft= er ?=C2=A0<br /><br />=C2=A0</div></div> <p></p> -- <br /> -- <br /> You received this message from the "vim_use" maillist.<br /> Do not top-post! Type your reply below the text you are replying to.<br /> For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt= p://www.vim.org/maillist.php</a><br /> <br /> --- <br /> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">vim_use+uns= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/93a47316-1060-4434-b330-d8b8b72e6595n%40googlegroups.com?utm_medium= =3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/vim_use/93a= 47316-1060-4434-b330-d8b8b72e6595n%40googlegroups.com</a>.<br /> ------=_Part_118913_1287139796.1774015093635-- ------=_Part_118912_882945117.1774015093635--