我在安装Vim 7.2和7.3的电脑之间使用相同的.vimrc。Vim 7.2的电脑每次打开文件时都会报错
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* *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.
if has('persistent_undo') set undofile set undodir=/tmp endif " Some options can only be checked with exists('+option'); I'm not sure why if exists('+relativenumber') set rnu endif if has('cryptv') set cryptmethod=blowfish end