On Thursday, March 19, 2026 at 3:01:12 AM UTC-4 Igbanam Ogbuluijah wrote:
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: > > [...] > > 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. > > 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. > > Regards, > Gary > > -- > -- > 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/20260319051249.GC10946%40phoenix. It's not that something's broken; but there definitely is some misconception. What I think is going on is… 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 These are the paths Vim looks for configuration files. system vimrc file: "/etc/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" In the documentation it states as mentioned above VIMINIT, also $MYVIMRC. This last part I will have to bring clarity too. -- -- 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/e84dc9e9-0831-4de2-a5d2-33aed9dbed5dn%40googlegroups.com.
