On 2020-02-13, 'Ottavio Caruso' via vim_use wrote:
> Hi,
>
> this is a snippet or my vimrc:
>
> $ cat .vim/vimrc
> source $VIMRUNTIME/defaults.vim
> set dir=~/.vim/tmp
> set expandtab
> set autoindent
> iabbrev mydate <C-R>=strftime("%a %d/%m/%Y")
> digraph bl 8226 " Insert Bullet with <CTRL>+k bl
> map <f5> :1m$<cr>
>
> which sources the default vim system file, which in turn sets
> "nocompatible", as expected. So far. so good.
>
> If I start vim with:
> $ vim -C somefile
>
> I expect this to turn some features off, for example visual mode with
> mouse clicks, but it doesn't. If I manually set "compatible" from the
> ex command line, it does turn visual mode off. I assume I could put
> this is my vimrc, but I don't want to do this all the time. I could
> probably make an alias to:
>
> vim -c "set compatible" somefile
>
> However I wonder if this is intended behaviour or not, that is, I
> expected "vim -C" to override vimrc.
From ":help -C":
-C Compatible mode. Sets the 'compatible' option. You can use
this to get 'compatible', even though a .vimrc file exists.
Keep in mind that the command ":set nocompatible" in some
plugin or startup script overrules this, so you may end up
with 'nocompatible' anyway.
Regards,
Gary