忽略vimrc中的“未知选项”错误

前端之家收集整理的这篇文章主要介绍了忽略vimrc中的“未知选项”错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在安装了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

如何让Vim忽略这些错误,并且不要在我打开文件提示我进入enter?

将新选项包含在:
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.

猜你在找的Bash相关文章