sponsor Vim development Vim logo Vim Book Ad

ragtag.vim : A set of mappings for HTML, XML, PHP, ASP, eRuby, JSP, and more (formerly allml)

 script karma  Rating 189/83, Downloaded by 8070  Comments, bugs, improvements  Vim wiki

created by
Tim Pope
script type
This plugin started out as a set of personal mappings, but there was enough enjoyment among those I shared it with for me to clean it up and release it.


While there are several HTML and XML scripts on vim.org, I have found none that share a significant amount of functionality with allml.vim.

A huge variety of filetypes are supported:  html, xhtml, wml, xml, xslt, xsd, jsp, php, aspperl, aspvbs, cf, mason, htmldjango, and eruby.  (Let me know if I missed any).  Some features take note of the filetype and adapt to it.

Maps for editing tags are provided.  This includes a couple of "make last word into a tag pair" maps, a doctype map (inserts <?xml ...?> in XML), a "close last tag" map, and a few extra goodies.

For templating languages (ASP, PHP, etc.), there are maps for inserting template code.  The maps are dependent on the filetype: in ASP, you get <% %> and <%= %>, in PHP, <?php ?> and <?php print ?>, etc.  If said template language has a comment syntax, there is a map for it, otherwise, that map points to <!-- -->.

Maps for XML/HTML escaping and URL encoding have been moved to unimpaired.vim, vimscript #1590.

Enhances surround.vim, vimscript #1697.

install details
Extract in ~/.vim or ~\vimfiles (Windows).  If you want a few general purpose mappings available globally, add the following to your vimrc:

let g:ragtag_global_maps = 1

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
ragtag.zip 2.0 2010-02-08 6.0 Tim Pope Rename from allml.vim to ragtag.vim.
Real documentation file.
Remove HTML/URL encoding in favor of using unimpaired.vim, vimscript #1590.
allml.vim 1.11 2007-07-16 6.0 Tim Pope Insert mode HTML/XML and URL escaping.
Clarified documentation and license.
allml.vim 1.8 2007-05-12 6.0 Tim Pope Initial upload
ip used for rating:

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.