Where is vimrc located by default on Mac

Where can I find vimrc by default on Mac, if not ~/.vimrc. On some Linux it is in/etc/vimrc

+8
source share
4 answers

The path used by the vim installation for MacOS by default is /usr/share/vim/vimrc.

On my system at the moment (macOS 10.12.5), this is its contents:

" Configuration file for vim
set modelines=0     " CVE-2007-2438

" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible    " Use Vim defaults instead of 100% vi compatibility
set backspace=2     " more powerful backspacing

" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup nobackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup nobackup
+9
source

Enter the terminal: vim --version
how do you want to check the vim version, then scroll down, you will find something like:user vimrc file: "$HOME/.vimrc"

Hope this helps.

+9
source

:echo $MYVIMRC . , :version, .

+5

OSX Mojave :

/usr/share/vim/vim80/syntax/

- , ~/.vim/syntax , .

0

Source: https://habr.com/ru/post/1680577/


All Articles