在安装了Vim 7.2和7.3之间的机器之间,我将使用相同的.vimrc文件。 Vim 7.2的机器每次打开文件时都会抱怨我的7.3特定选项:
Error detected while processing /home/spiffytech/.vimrc: line 72: E518: UnkNown option: rnu line 73: E518: UnkNown option: undofile line 74: E518: UnkNown option: undodir=/tmp line 75: E518: UnkNown option: cryptmethod=blowfish Press ENTER or type command to continue
将新选项包含在:
if version >= 703 set rnu ... endif
请查看有关v:version的帮助,以获取有关要使用的版本号的更多信息:
*v:version* *version-variable* v:version Version number of Vim: Major version number times 100 plus minor version number. Version 5.0 is 500. Version 5.1 (5.01) is 501. Read-only. "version" also works,for backwards compatibility. Use |has()| to check if a certain patch was included,e.g.: > if has("patch123") < Note that patch numbers are specific to the version,thus both version 5.0 and 5.1 may have a patch 123,but these are completely different.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。