简体   繁体   English

在.vimrc文件顶部需要设置哪些命令?

[英]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? 实际上,我正在编写.vimrc,我想知道应该在.vimrc文件顶部设置哪些命令? (like :set nocp that it needs be be first in a .vimrc file (according to its help file)) (例如:set nocp ,它必须首先在.vimrc文件中(根据其帮助文件))

Personally, I have set nocompatible , then Vundle stuff (according to its docs), then just set s in alphabetic order and other commands. 就个人而言,我已经set nocompatible ,然后Vundle (根据其文档)的东西,那么就set S IN字母顺序等命令。 (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.) (顺便说一句,多年来积累在我的.vimrc 1928行即使在进行资源分配之后也可以很好地工作。为此,我在节,小节等中使用缩进,以使配置易于管理。)

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 . 不,在vimrc任何地方都不需要set nocompatible

I've collected a number of battle-tested best practices in this repository . 我已经在此存储库中收集了许多经过实践检验的最佳实践。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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