2

我在许多系统上使用相同的 .vimrc 文件。我想绕过 vundle 安装一些我知道如果 'if_lua' 不存在将无法工作的模块。

是否有有条件地做的vim脚本方式

Bundle 'Shougo/neocomplete.vim'

仅当 vim 使用 lua 编译以避免启动错误时:

$ vim myprogram.c
neocomplete does not work this version of Vim.
It requires Vim 7.3.885 or above and "if_lua" enabled Vim.
Press ENTER or type command to continue

谢谢

4

1 回答 1

7
if has('lua')
    Bundle 'Shougo/neocomplete.vim'
end
于 2014-05-25T16:35:08.870 回答