Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 795
nothing-special-here Avatar asked Dec 05 '25 07:12

nothing-special-here


1 Answers

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.

like image 159
Ingo Karkat Avatar answered Dec 07 '25 01:12

Ingo Karkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!