nothing-special-here
nothing-special-here

Reputation: 12578

Vim syntax highlighting for ARB templates (ActiveAdmin) is not working

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?

Upvotes: 2

Views: 592

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172608

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.

Upvotes: 9

Related Questions