At some point which I cannot pinpoint, sourcing $MYVIMRC on the fly stopped working.
I tried the solution given here
by typing the following on my terminal: export VIMINIT='source ~/.vimrc'
That didn't work.
Changes to my vimrc file are reflected once I restart Vim, but not reflected without doing so. Please help.
:echo $MYVIMRCand is your vimrc at that location? – Rich Oct 14 '22 at 12:12:so $MYVIMRCdoesn’t source the file, but it’s a bit unclear. @Alvaro: could you please clarify? – Rich Oct 14 '22 at 17:58:source $MYVIMRCis not displaying the behaviour I have come to expect, which is reflecting the changes I make tovimrcon the fly.and
– Alvaro Neto Oct 15 '22 at 04:48:echo $MYVIMRCshows/home/alvaro/.vimrc, as expected. Apologies for the typo on the main postvimrcin two different locations and i was editing one that was not being sourced. I don't remember how I did it but I was quite irritated with myself when I figured it out. – MDeBusk Oct 15 '22 at 07:00echom "test"? 3. Does it work if you type in the actual file path instead of $MYVIMRC? 4. Does it work if you copy the file to a different location and source that? – Rich Oct 15 '22 at 07:41@Rich I am adding new mappings, i.e.
nnoremap <leader>m, which, again, works when Vim is restarted, but not otherwise. To your second question, once I source it, test is printed to messages (as you may have predicted). So this pin-points the issue (but I still don't know how to solve it).Apologies for my delay in replying to you both.
– Alvaro Neto Oct 17 '22 at 14:54