When I open ARB template with Vim syntax highlighting is not working:

-app/views/admin/news/_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
#...

Everything is just black and white, it doesn't show colors

How to fix that?

有帮助吗?

解决方案

Your ARB templates aren't recognized by Vim. To teach Vim to highlight them as Ruby, create a file ~/.vim/ftdetect/arb.vim and insert the following command:

autocmd BufRead,BufNewFile *.arb setfiletype ruby

For more information, see :help new-filetype.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top