sponsor Vim development Vim logo Vim Book Ad

closeb : Close complex brackets or tags

 script karma  Rating 92/40, Downloaded by 3368  Comments, bugs, improvements  Vim wiki

created by
Mark A. Hillebrand
 
script type
utility
 
description
This plugin closes complex brackets / tags.
It is an extended version of closetag, (http://vim.sourceforge.net/scripts/script.php?script_id=13)

It comes with configuration for closing XML/SGML tags and LaTeX environments but is easily configured for other filetypes.

Closing a bracket / tag also (optionally) inserts a newline and / or indentation, but only if the matching bracket / tag stood on a line of its own.

If, during scanning for the bracket / tag to close, mismatching brackets are found, they are optionally highlighted.

A path function is provided, which displays all open tags. For example, this function may be used in the status line for a constant display of location in an XML file.
 
install details
Put this into your plugin directory ~/.vim/plugin.
It will map CTRL-_ to closing a tag in insert mode (as closetag.vim did). The :Path command displays the "path".
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
closeb.vim 0.2a 2002-02-27 6.0 Mark A. Hillebrand Commented out some debug code...
closeb.vim 0.2 2002-02-22 6.0 Mark A. Hillebrand This version now supports a new type of close, the "middle close". For XML/SGML, it will close the tag and reopen the same tag (useful for list of tags); for LaTeX, it will insert \item inside of {itemize}, {enumerate}, .. environments, just close otherwise.

Middle closes are invoke by the two-key sequence CTRL-\ =
closeb.vim 0.1 2002-02-22 6.0 Mark A. Hillebrand Initial upload
ip used for rating: 18.118.1.158

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github