开发者

Tag completion with vim? [duplicate]

This question already has answers here: Closed 11 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜