Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top