In https://stackoverflow.com/a/130741/168646 I learned about closetag.vim, which is exactly what I was hoping to find. However, I can’t seem to get it working for the .html.erb files in my rails project.
I tried adding erb and html.erb to the list of file types that source the script (in my .vimrc file):
autocmd Filetype html,xml,erb,html.erb source ~/.vim/scripts/closetag.vim
What am I missing?
The file type of .erb files is
eruby. Add it to yourautocmd:To determine what filetype Vim is using for a file, you can do: