Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with Vim and lua?

Tags:

I installed yadr onto my terminal, but I keep getting the following error when I open Vim:

neocomplete does not work this version of Vim. It requires "if_lua" enabled Vim(7.3.885 or above). 

EDIT:

  • Upgraded Vim to version 7.4.493 but still get the error.
  • Running OS X Yosemite
like image 968
Kevin Lin Avatar asked Nov 03 '14 23:11

Kevin Lin


People also ask

Does vim have Lua support?

Vim has good Lua support, but it's API is smaller of course.

Where is init Lua?

Configure Startup Options Normally init. lua is under $HOME/. config/nvim (for Linux and macOS), but you can use XDG_CONFIG_HOME to specify a different folder.


1 Answers

This fixed it:

brew install macvim --with-cscope --with-lua --HEAD brew uninstall vim brew install vim --with-lua 


If it still doesn't work after running the previous commands:

When you install vim with brew, it probably didn't install it to the "correct" location. Looking at the terminal output during the installation (brew install vim) should tell you this location. For me, brew installed vim here:

/usr/local/Cellar/vim/7.4.712 

Whereas when I ran which vim, I got the following result:

$ which vim /usr/bin/vim 

So all you have to do is:

sudo cp /path/to/newly/installed/vim /path/to/old/vim 

In my case, I did:

sudo cp /usr/local/Cellar/vim/7.4.712 /usr/bin/vim 
like image 170
Kevin Lin Avatar answered Oct 15 '22 09:10

Kevin Lin