So only if your user is missing a ~/.vimrc or ~/.vim/vimrc file. will ship Vim initialization they find is relevant for your distribution there.įile defaults.vim is loaded automatically only if you don't have a user vimrc file. $VIMRUNTIME/defaults.vim is the "defaults" file, which was only introduced in Vim 8.0 (at least, that was the first non-patch release to include the feature.)įile /etc/vim/vimrc is controlled by the Linux distribution, so Debian or Red Hat, etc. In terms of the order of configuration reads, :scriptnames shows what scripts got read in which order, and :help initialization has all the gory details.įile /etc/vim/vimrc is the so-called "system" vimrc file (it should be listed as so in your :version output.) Those should only make uncontroversial changes (like :syntax on), so that should not interfere, but most option changes can also be undone by your ~/.vimrc. In general, if the defaults don't work for you, do all your customization in your user's ~/.vimrc, and leave any system-wide configuration alone. Your question hints at confusion with that configuration. Many people did not like that Vim starts with conservative defaults (for vi compatibility), and the "helpful" system-wide configuration also caused confusion (as Vim has so many configuration possibilities and flexibility), and so with Vim 8.0 a default configuration in the form of defaults.vim was added. It represents the opinion of the distribution's maintainers about good (and secure) defaults.įor a long time, Vim itself didn't provide any default configuration instead, it just shipped with an example ( :help vimrc_example.vim) to get individual users started on their personal configuration (i.e. the Debian folks for the vim-common APT package). etc/vim/vimrc is a system-wide default Vim configuration added by the corresponding package maintainers (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |