The other day I was using one of my non-interactive scripts to set up my dot files for my home directory, including my .vimrc file. This is what I had the script put into my .vimrc file:
This was before I knew vim can interpret 'source' but not '.' when sourcing external configuration. I thought my script worked well and then I got this error later when opening up vim:
search hit BOTTOM, continuing at TOPError detected while processing /home/demo/.vimrc: line 1: E486: Pattern not found: etc
It would have been really nice if I could have run some sort of sanity check on my .vimrc in my script so that I could have found out about my misconfigured settings sooner rather than later. How can I run a sanity check on my .vimrc configuration from the shell programmatically, without user interaction?