Re: Specifying .vimrc on cmdline
- Tim Chase wrote:
>> What's confusing though, is that my ~/.vimrc does not overrideOK, then you can workaround it:
>> /etc/vim/vimrc and each time I run vim, both are sourced by
>> default, although I don't have a `source' cmd in ~/.vimrc for
>> /etc/vim/vimrc. But supplying .vimrc in the cmdline overrides
>> all others.
> As buried in the
> :help vimrc
> If Vim was started with "-u filename", the file
> "filename" is used.
> All following initializations until 5. are skipped.
> This means that it will skip the system vimrc file as well as the
> loading of plugins. Without the "-u filename" side of things, it will
> proceed by default with the loading of both the system-wide vimrc and
> the loading of plugins.
> The default think-process would be "load the system vimrc file, then
> override it with any settings in the ~/.vimrc for this particular user"
> whereas specifying the "-u" option would be something like "these
> settings are exactly what I want, no more, no less".
<<<<< ~/__vimrc <<<<< end
$ vim -u ~/__vimrc main.c
Like this it doesn't make much sense but if you add other ex-commands in
~/__vimrc (or /devel/abraca/d/acarba/src/vimrc or whatever) then it will.