Use this page to discuss script 13 closetag: functions and mappings to close open HTML/XML tags

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.

Possible tweaks for closetag.vimEdit

  • Leave the cursor just before the close tag. This way you can invoke the close tag just after typing the opening tag, leaving the cursor automatically in the middle for filling the tag with the content.

Change the line:

    return "</".tag.">"


    return "</".tag.">\<esc>bbli"
  • Use Ctrl+> instead of Ctrl+_ for invoking the script. It's faster, as > is the last character you type in the opening tag and you already have the finger there!

In the script replace <C-_> with <C-\>. --March 31, 2012


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.