Use closetag.vim script in .html.eb files

In qaru.site/questions/56988 / ... I learned about closetag.vim, and this is what I was hoping to find. However, I can't seem to get it to work with files .html.erb

in my rails project.

I tried to add erb

and html.erb

to the list of file types the script sends (in my .vimrc file):

autocmd Filetype html,xml,erb,html.erb source ~/.vim/scripts/closetag.vim

What am I missing?

+3


source to share


1 answer


The file type of .erb files eruby

. Add it to your autocmd

:

autocmd Filetype html,xml,eruby source ~/.vim/scripts/closetag.vim

      



To determine what type of file Vim is using for a file, you can do:

set filetype?
" Shows:
" filetype=eruby

      

+4


source







All Articles