ARB模板(ActiveAdmin)的Vim语法突出显示无效

not*_*ere 0 vim syntax-highlighting activeadmin vim-syntax-highlighting

当我用Vim语法打开ARB模板时,突出显示不起作用:

-app /视图/管理/新闻/ _show.html.arb

panel "#{t('active_admin.details', model: "News")}" do
  attributes_table_for news do
    row :id
    row :title
    row :description
    row :twitter_url do
      link_to(news.twitter_url, news.twitter_url, target: "_blank") if news.twitter_url
    end
#...
Run Code Online (Sandbox Code Playgroud)

一切都只是黑色和白色,它不显示颜色

如何解决?

Ing*_*kat 6

Vim无法识别您的ARB模板.要教Vim将它们突出显示为Ruby,请创建一个文件~/.vim/ftdetect/arb.vim并插入以下命令:

autocmd BufRead,BufNewFile *.arb setfiletype ruby
Run Code Online (Sandbox Code Playgroud)

有关更多信息,请参阅:help new-filetype.