I am using Vim 8.1 on a Ubuntu system. Here are the three cases I have found.
$ ls -l ~/.vimrc
ls: cannot access '/home/lone/.vimrc': No such file or directory
$ vim -u NONE +':filetype'
filetype detection:OFF plugin:OFF indent:OFF
$ ls -l ~/.vimrc
ls: cannot access '/home/lone/.vimrc': No such file or directory
$ vim +':filetype'
filetype detection:ON plugin:ON indent:ON
$ touch ~/.vimrc
$ ls -l ~/.vimrc
-rw-r--r-- 1 lone lone 0 Nov 2 18:41 /home/lone/.vimrc
$ vim +':filetype'
filetype detection:OFF plugin:OFF indent:OFF
filetype
options are ON when ~/.vimrc
is present but OFF when ~/.vimrc
is present?:help
documentation can I find more about this behavior?vim -u NONE
starts vim
without any config file and sets all options to default values.
vim
without ~/.vimrc
reads configuration values from a system config file. Try /etc/vim/vimrc
or /usr/share/vim/vimrc
.
See http://vimdoc.sourceforge.net/htmldoc/starting.html#initialization