はじめに
Raspberry pi 上でElixirで遊ぶため、vimを入れたので、シンタックスを設定しようとしたが、vimやNeoBundleについて知らなすぎたため、2時間ハマった。そのハマった点を忘れないよう記事にした。
環境
- OS:Rasbian
原因
vimrc内に ”syntax enable" がなかったこと
手順
基本的な手順は1.の通りである。
セットアップ
$ mkdir -p ~/.vim/bundle $ git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim
$HOME/.vimrc の設定
以下をファイルへ追記する。
set nocompatible
filetype off " for NeoBundle
if has('vim_starting')
set rtp+=$HOME/.vim/bundle/neobundle.vim/
endif
call neobundle#begin(expand('~/.vim/bundle'))
NeoBundleFetch 'Shougo/neobundle.vim'
" ★
" ここから NeoBundle でプラグインを設定します
" NeoBundle で管理するプラグインを追加します。
NeoBundle 'Shougo/neocomplcache.git'
NeoBundle 'Shougo/unite.vim.git'
NeoBundle 'elixir-lang/vim-elixir' " elixir のシンタックス
call neobundle#end() " ★から移動
filetype plugin indent on " restore filetype
syntax enable " これがなかったため、シンタックスが表示できず。。。
プラグインのインストール
- vimの起動。ファイル指定しなくともよい。
- NeoBundleInstallの実行(:NeoBundleInstall とコマンド実行)
- vimの終了
シンタックス確認
適当なelixirのファイルを開く。色が付いていればOK。

