Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 882 Bytes

README.md

File metadata and controls

36 lines (20 loc) · 882 Bytes

closetag.vim

Auto close tag, support xml files. In addition to the alvan version, a line feed is added and the cursor is set with the appropriate indentation.

Demo with MatchTagAlways activated.

alt tag

Just set this in your vimrc:

# filenames like *.xml, *.html, *.xhtml, ...
let g:closetag_filenames = "*.html,*.xhtml,*.phtml"

Then after you click > in those files, this plugin will try to close the current tag for you.

Usage

For example, below is the current content:

<table|

Now you press >, the content will be:

<table>|</table>

And now if you press > again, the content will be:

<table>
    |
</table>

Install Detail

Just put the files into ~/.vim/ or <HOMEDIR>\vimfiles\ (for Windows).