How can I get vim's closetag plugin to work for all html tags?

I had troubles with closetag. Vim when I installed it in ~/. Vim/plugins Then I moved it into ~/.

Vim/scripts instead, and added the following to my vimrc : :let g:closetag_html_style=1 :source ~/. Vim/scripts/closetag. Vim and now it works fine for me.

I find that it closes all tags (including those included in the 'ignore' list), but not those that are self-closing (e. G img ) In the version of the script that I am using (0.9.1), it defines C as the trigger for completing tags. If you have mapped the command to tab then that should work too.

I had troubles with closetag. Vim when I installed it in ~/. Vim/plugins.

Then I moved it into ~/. Vim/scripts instead, and added the following to my . Vimrc: :let g:closetag_html_style=1 :source ~/.

Vim/scripts/closetag. Vim and now it works fine for me. I find that it closes all tags (including those included in the 'ignore' list), but not those that are self-closing (e.g. ).

In the version of the script that I am using (0.9.1), it defines as the trigger for completing tags. If you have mapped the command to , then that should work too.

I also put it in the plugins folder. As mentioned it works on some tags just not some very common ones (p, ul, li). I will try what you mentioned.

– chris Sep 22 '09 at 2:55 I get the same thing as before. Am I not using the plugin properly? I hit the Tab key to complete a tag.

For the tags that I mentioned it doesn't work the cursor just tabs over 2 chars. – chris Sep 22 '09 at 13:43 Did you configure the tab key as the closetag trigger? As I said before, the default is (control+underscore).

What happens if you press that? – nelstrom Sep 22 '09 at 15:27.

I also cannot get this plugin to work, however in my case what it does it throw out a number of error messages before finally working. For instance if I try to close an H1 tag I will get the error Error Detected while processing function GetCloseTag and the error is an undefined variable b:UnaryTagsStack. Seems like it would be a useful plugin but it just won't cooperate.

My new favourite is the allml. Vim plugin by Tim Pope. It hasn't failed me yet.

– chris Oct 1 '09 at 22:26.

I had the same issue and nelstrom's answer above didn't solve it for me. What worked for me was adding the following lines to my . Vimrc: if!

Exists("b:unaryTagsStack") || exists("b:closetag_html_style") if &filetype == "html" || exists("b:closetag_html_style") let b:unaryTagsStacktack="area base br dd dt hr img input link meta param" else " for xml and xsl let b:unaryTagsStack="" endif endif if! Exists("b:unaryTagsStack") let b:unaryTagsStack="" endif I don't know why adding just let b:unaryTagsStack="" didn't do the trick, but the combination above seems to fix it in all file types for me.

Never mind. My "fix" doesn't work all the time, but it's not very predictable. CloseTag seems to sporadically forget the value of b:unaryTagsStack.

Time to try allml.vim. – JoshMock Sep 21 at 22:30.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions