単純に7.4をインストールするだけなら以下のコマンドでOK。
$ brew install vim
ただし、上のコマンドでインストールするとluaオプションがついていないため、neocompleteが使えない。
neocompleteをインストールしてvimを起動すると、以下のようなメッセージが出力される。
$ vim 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
luaオプションをつけてインストールするには以下のコマンドでインストールする。
# luaをインストール $ brew install lua # オプションをつけてvimをインストール $ brew install vim --devel --with-lua
あとは、既存の/usr/bin/vimよりもHomebrewでインストールした/usr/local/bin/vimが優先されるようにパスの設定を行えばOK。
ちなみに、その他にもhomebrewでvimをインストールするオプションがいくつかあるようだ。
$ brew options vim --disable-nls Build vim without National Language Support (translated messages, keymaps) --override-system-vi Override system vi --with-client-server Enable client/server mode --with-lua Build vim with lua support --with-luajit Build with luajit support --with-mzscheme Build vim with mzscheme support --with-perl Build vim with perl support --with-python3 Build vim with python3 support --with-tcl Build vim with tcl support --without-python Build vim without python support --without-ruby Build vim without ruby support --HEAD install HEAD version
終わり。