LoginSignup
53
52

More than 5 years have passed since last update.

enable-luaなvim7.4をインストール

Last updated at Posted at 2013-11-22

neocomplcacheの後継でneocompleteなるものが出てるらしい。
neocomplcacheはファイルパスやら変数やらを補完してくれるんだけども、サジェストが遅いのがウーンだった。
neocompleteは速くなってるらしい。
しかし、luaなるものにvimが対応してなければいけないらしく、CentOS6.4のデフォルトのvimは古くて対応不可
ということで、ソースからインストールしてみた

ソースの入手

cd /usr/local/src/
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar xvf vim-7.4.tar.bz2
cd vim74/

configure

どういうオプションが利用可能かは、./configure --helpで確認できる

./configure \
 --enable-multibyte \
 --with-features=huge \
 --enable-luainterp \
 --enable-perlinterp \
 --enable-pythoninterp \
 --with-python-config-dir=/usr/lib64/python2.6/config \
 --enable-rubyinterp \
 --with-ruby-command=/usr/bin/ruby \

make

make
  • ここでエラーが出るようなら、末尾のあやしいメッセージをggrる
  • エラーがなければ、makeしたvimで意図した機能が有効になってるか確認する
./src/vim --version

これがmakeしたvim(たとえば、luaが有効なら+lua/無効なら-lua)

  • おかしいようなら、configureのログを見る
less ./src/auto/config.log

install

make install
  • 問題なくmakeできたらinstallする

ハマったこと

make が失敗する

no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.
  • yum install ncurses-develで対応

luaが有効にならない

checking --enable-luainterp argument... yes
checking --with-lua-prefix argument... no
checking LUA_PREFIX environment var... not set, default to /usr
checking --with-luajit... no
checking for lua... (cached) /usr/bin/lua
checking Lua version... (cached) 5.1
checking if lua.h can be found in /usr/include... no
checking if lua.h can be found in /usr/include/lua5.1... no
  • yum install lua-develで対応

--enable-perlinterp でconfigureが失敗する(ログとり忘れたので、参考程度に

Can't open perl script "/usr/share/perl5/ExtUtils/xsubpp":
  • yum install perl-ExtUtils-Embedで対応

pythonが有効にならない(ログとり忘れたので、参考程度に

  • --enable-pythoninterpだけオプションにしてたので、--with-python-config-dir=hogeもつける→ディレクトリないぞ!
  • yum install python-devel
  • find / -name config -type d でそれらしきディレクトリを見つけた

rubyが有効にならない(ログとり忘れたので、参考程度に

  • --enable-rubyinterpだけオプションにしてたので、--with-ruby-command=/usr/bin/rubyもつける
53
52
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
53
52