Thursday, November 13, 2014

Cool Tools: Vim Tricks

This post will help me remember cool tricks I learn in VIM.  It's mostly for me to find things I've forgotten how to do ...

Select an XML/HTML tag block


Tag blocks      *tag-blocks*

For the "it" and "at" text objects an attempt is done to select blocks between
matching tags for HTML and XML.  But since these are not completely compatible
there are a few restrictions.

The normal method is to select a  until the matching .  For "at"
the tags are included, for "it" they are excluded.  But when "it" is repeated
the tags will be included (otherwise nothing would change).  Also, "it" used
on a tag block with no contents will select the leading tag.


No comments: