LoginSignup
1
2

More than 3 years have passed since last update.

[WIP] macOS Mojave 10.14.6にvim(+clientserver,+clipboard)をソースからインストールする手順

Last updated at Posted at 2019-08-13

このページはまだ完成していません。自分用の備忘録です。

モチベーション

  • macOS で texvim(vim +clientserverが必要)を使いたかったが,brew install vimでインストールした vim には +clientserver が入っていなかったため.
  • brew install vim --with-client-serverでは vim(+clientserver)がインストールされなかったため.

インストール手順

  • ビルドに必要なパッケージをダウンロードする.
bash
$ brew install lua luajit
  • vimをソースコードからインストールする.
bash
$ git clone git@github.com:vim/vim.git
$ cd vim
$ make distclean
$ rm src/auto/config.cache
# configureスクリプトを実行して、Makefileを作成する。
$ ./configure \
  --with-features=huge \
  --with-x \
  --enable-multibyte \
  --enable-luainterp=dynamic \
  --with-luajit \
  --with-lua-prefix=/usr/local \
  --enable-gpm \
  --enable-cscope \
  --enable-fontset \
  --enable-fail-if-missing \
  --prefix=/usr/local \
  --enable-pythoninterp=dynamic \
  --enable-python3interp=dynamic \
  --enable-rubyinterp=dynamic \
  --enable-gui=auto \
  --enable-gtk2-check \
  --disable-darwin \

  # --disable-darwin は, macOSでmakeするときに必要.
  # macOSの場合, 最後の '--with-lua-prefix' を指定しないとconfigure時に 'configure: error: could not configure lua' が出てしまう.
$ make
$ sudo make install

PATHを通す

.bash_profile
# .bash_profileに以下を追加する
export PATH=/usr/local/bin:$PATH
bash
$ source .bash_profile

アンインストール手順

bash
$ cd vim
$ make uninstall
$ sudo make uninstall

参考文献

1
2
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
2