简体   繁体   中英

Which commands are needed to set at top of the .vimrc file?

My question is pretty clear in title, isn't it? Actually I'm writing my .vimrc and I want to know which commands should be set at the top of a .vimrc file? (like :set nocp that it needs be be first in a .vimrc file (according to its help file))

Personally, I have set nocompatible , then Vundle stuff (according to its docs), then just set s in alphabetic order and other commands. (By the way, 1928 lines that accumulated in my .vimrc over years work pretty well even after resourcing without any particular effort for that. I use indentation for sections, subsections, etc. to keep the config manageable.)

There are no mandatory commands, since if something must always be done for everyone, then this is not a part of a config.

In general, just write what you need step-by-step and fix any incompatibilities when they show up.

No, set nocompatible is not necessary anywhere in your vimrc .

I've collected a number of battle-tested best practices in this repository .

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