# Vim: What html plugin do you use to help you close tags?

**URL:** <https://www.ruby-forum.com/t/vim-what-html-plugin-do-you-use-to-help-you-close-tags/176448>\
**Category:** Rails\
**Created:** [September 30, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/vim-what-html-plugin-do-you-use-to-help-you-close-tags/176448 "2009-09-30T17:58:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisolsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c6cbf5/32.png) [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Post date:** [September 30, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/vim-what-html-plugin-do-you-use-to-help-you-close-tags/176448/1 "2009-09-30T17:58:30Z")

</div>

I have tried to use the closetag.vim, but would always get numerous  
errors when pressing ctrl-\_ that I would have to click the enter key for  
each of the errors before it would finally close the tag for me.

I started using xml.vim which works great for normal xml/html files, but  
always creates a closing “tag” when I am passing hash params to a  
function.  
ex. \<%= link\_to “foo”, some\_url, :class =\> “bar” %\>  
results in after entering the \> character:  
\<%= link\_to “foo”, some\_url, :class =\> \</%=\>

Is there a better plugin that I should be using?

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![chrisolsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c6cbf5/32.png) [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Post date:** [September 30, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/vim-what-html-plugin-do-you-use-to-help-you-close-tags/176448/2 "2009-09-30T18:18:52Z")

</div>

Chris O. wrote:

> I have tried to use the closetag.vim, but would always get numerous  
> errors when pressing ctrl-\_ that I would have to click the enter key for  
> each of the errors before it would finally close the tag for me.
> 
> I started using xml.vim which works great for normal xml/html files, but  
> always creates a closing “tag” when I am passing hash params to a  
> function.  
> ex. \<%= link\_to “foo”, some\_url, :class =\> “bar” %\>  
> results in after entering the \> character:  
> \<%= link\_to “foo”, some\_url, :class =\> \</%=\>
> 
> Is there a better plugin that I should be using?
> 
> Thanks for the help.

Tim Pope’s allml.vim plugin works quite well  
[http://www.vim.org/scripts/script.php?script\_id=1896](http://www.vim.org/scripts/script.php?script_id=1896)
