2

I use the same .vimrc file on lots of systems. I'd like to bypass vundle installing some modules that I know won't work if 'if_lua' is not present.

Is there a vim script way of conditionally doing

Bundle 'Shougo/neocomplete.vim'

only if vim was compiled with lua to avoid the start up error:

$ 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

thx

navicore
  • 1,979
  • 4
  • 34
  • 50
  • 1
    The cool thing about vim plugins is you can read their source code. You can find how neocomplete checks this by opening `neocomplete/plugin/neocomplete.vim` and searching for the error message. – FDinoff May 25 '14 at 18:20

1 Answers1

7
if has('lua')
    Bundle 'Shougo/neocomplete.vim'
end
Dhruva Sagar
  • 7,089
  • 1
  • 25
  • 34