Use closetag.vim script in .html.eb files

In / ... 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?


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




All Articles