简体   繁体   中英

vim overrides default settings when adding new .vimrc file

I have recently tried to aid in automating my workflow in vim. Since there wasn't a .vimrc file in my home folder by default, I've made a new one and put my code in. After starting up vim again I was surprised to see my C code unhighlighted. After removing .vimrc file, everything was back to normal. Knowing this, I would assume vim falls back to some internally defined .vimrc file when there isn't one in the user folder. Is there a way to load a user-made .vimrc file without overriding system default settings? If not, is there a list of commands that I can put into my .vimrc file to restore those settings?

If not, is there a list of commands that I can put into my .vimrc file to restore those settings?

Yes, simply add the line runtime defaults.vim on top of your vimrc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM