11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Amazon Linuxにluaとか対応してるvimをインストールする

Last updated at Posted at 2015-10-05

概要

表題の通りです。
デフォルトなvimは-luaってなってて(neocompleteが効かなくて)悲しかったので自分で入れちゃう。

前提

uname -a
# => Linux 940399d03c1a 4.1.7-15.23.amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  • 面倒なのでrootユーザーで一通りやってます

流れ

1. ncurses-develをインストールする

yum install -y ncurses-devel

2. lua-develとかruby-develとか入れとく

yum install lua-devel ruby-devel

3. GitHubからソースコード引っ張ってくる

これです。

cd /path/to/src
git clone https://github.com/vim/vim.git

4. とりあえず最新のver.にする

めっちゃtagが多いけど、とりあえずv7.4の最新を引っ張ってくる。

# めっちゃたくさん出てくるからlessとかに渡して探す
git tag | less
# => (めっちゃたくさん出てくる)

git checkout v7.4.889

5. configureします

とりあえず以下のようなかんじにしといた。
perl-develを入れて--enable-perlinterpもつけようかと思ったけど、make installでコケたから外してしもた。

./configure \
  --prefix=/usr/local \
  --enable-multibyte \
  --enable-luainterp \
  --enable-rubyinterp \
  --with-ruby-command=/usr/bin/ruby \
  --enable-pythoninterp \
  --with-python-config-dir=/usr/lib64/python2.7/config
# => (logだばー)

6. makeする

make
# => (logだばー)

終わったら、compileしたvimを実行して確認してみる。

./src/vim --version
# => VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct  5 2015 21:00:00)
# => Included patches: 1-889
# => (中略)
# => +lua
# => (以下略)

よし。

7. make installする

make install

おわりに

類似エントリはありそうだけど、まあいいか。
参考になれば幸いです。

参考

11
8
0

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
11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?