Tag completion with vim? [duplicate]
Possible Duplicate:
How can one close html tags in vim quickly
One of my favorite features of TextMate is the ability to type out a tag, say <div>
, and press ⌥+⌘+., it will automatically insert t开发者_运维百科he corresponding end tag, </div>
.
How can I do this in vim?
I use the xmledit
plugin for this.
...When in insert mode and you finish a tag (pressing '>') the tag will be completed. If you press '>' twice it will complete the tag and place the cursor in the middle of the tags on it's own line.
I've not used TextMate so I'm not sure if this is quite the same thing but there is a vim plugin called snipmate that may help you out.
http://www.vim.org/scripts/script.php?script_id=2540
精彩评论