LoginSignup
6
3

More than 5 years have passed since last update.

NeoBundle 'slim-template/vim-slim' のsyntaxが効かない件

Posted at

RailsのViewでHTML書くの面倒だから、最近は基本的にslim使っています。
しかし、現環境でvimのslimソースを色付けしてくれるsyntax用プラグインがなんだかうまく機能しません。

~/.vimrc
NeoBundle 'slim-template/vim-slim'

スクリーンショット 2015-10-19 0.35.03.png

:NeoBundleClean からの :NeoBundleInstall
また :NeoBundleUpdate しても動かないので困った。
そして、Google先生で調べていたらこのような記事を発見。

vim-slim のシンタックスハイライトが機能しない

もしあなたが Yggdroot/indentLine を使ってて
なおかつ
let g:indentLine_faster = 1 を設定している
なら
それをオフにしましょう

もしかしてインデントとか他のPluginとか設定と何か競合する可能性があるのか…?
良くわからないけどインデント系とかの記述を順番に無効にしてみる。
結果、

.vimrc
"シンタックスハイライト有効
syntax on
filetype plugin indent on
filetype indent on

▼コメントアウト▼

.vimrc
"シンタックスハイライト有効
"syntax on
"filetype plugin indent on
"filetype indent on

上記を3つともコメントアウトしたら動いた!

スクリーンショット 2015-10-19 0.34.55.png

うん…。原因よくわからんな(´・ω・`)

VimScriptはよく知りませんが、やっぱりVimの他のプラグインとかの設定が競合してるのかな?
取り敢えずRailsで使う基本的なファイルはコレで綺麗に見えるのでそのまま使ってみます。

6
3
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
6
3