LoginSignup
1
1

More than 5 years have passed since last update.

macOS Sierra にVim 8 をインストールしてみた。

Posted at

Vim 8.0が発表されてしばらく経ったので、試してみようとbrew でアップデートしようとすると、7.4で止まっているらしく、ソースからインストールしたが、ちょっとハマったのでメモ。

Vim 8.0のインストール自体は問題なく完了した。

spf13を利用しているが、プラグインに必要なLuaがないとメッセージが出てします。

vim を起動して。
luaが入っているかを確認すると、有効にしていると思っていたLuaが入っていない。


:version

Huge version without GUI.  Features included (+) or not (-):
+acl             +conceal         +file_in_path    +libcall         +mouse_sgr       +profile         +tag_old_static  +viminfo
+arabic          +cryptv          +find_in_path    +linebreak       -mouse_sysmouse  -python          -tag_any_white   +vreplace
+autocmd         -cscope          +float           +lispindent      +mouse_urxvt     +python3         +tcl             +wildignore
-balloon_eval    +cursorbind      +folding         +listcmds        +mouse_xterm     +quickfix        +termguicolors   +wildmenu
-browse          +cursorshape     -footer          +localmap        +multi_byte      +reltime         +terminfo        +windows
++builtin_terms  +dialog_con      +fork()          -lua             +multi_lang      +rightleft       +termresponse    +writebackup
+byte_offset     +diff            -gettext         +menu            -mzscheme        +ruby            +textobjects     -X11
+channel         +digraphs        -hangul_input    +mksession       +netbeans_intg   +scrollbind      +timers          -xfontset
+cindent         -dnd             +iconv           +modify_fname    +num64           +signs           +title           -xim
-clientserver    -ebcdic          +insert_expand   +mouse           +packages        +smartindent     -toolbar         -xpm
+clipboard       +emacs_tags      +job             -mouseshape      +path_extra      +startuptime     +user_commands   -xsmp
+cmdline_compl   +eval            +jumplist        +mouse_dec       +perl            +statusline      +vertsplit       -xterm_clipboard
+cmdline_hist    +ex_extra        +keymap          -mouse_gpm       +persistent_undo -sun_workshop    +virtualedit     -xterm_save
+cmdline_info    +extra_search    +lambda          -mouse_jsbterm   +postscript      +syntax          +visual
+comments        +farsi           +langmap         +mouse_netterm   +printer         +tag_binary      +visualextra
./configure

のメッセージを見返すとlua.hとluaJitが見つからないと言われている。普段はbrewでインストール指定なので、どれを入れると正しく動くのかわからないが、brewで入れたバージョンをアンインストールして、それぞれソースから入れ直すと無事にLuaが入るようになり、プラグインも動くようになった。

lua
luajit

ポイントは --with-lua-prefix=/usr/local/--with-lua-prefix=/usr/local/bin/luaとしてしまうと、brewのluaと同じエラーメッセージになった。試していないが、最初から指定のパスを変えるだけでよかったのかもしれない。

./configure --enable-python3interp --enable-luainterp  --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-multibyte  --enable-fail-if-missing --with-lua-prefix=/usr/local/ --with-local-dir=/usr/local/include --with-luajit
1
1
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
1
1