[pm-h] Expanding on a Vim feature

G. Wade Johnson gwadej at anomaly.org
Wed Jan 14 17:20:54 PST 2009


Last night in the talk, I commented on Vim's "text object" feature and
showed how to select everything between a set of { } or [ ] with just a
few keystrokes. I didn't talk much about another variant: "it" or "at"
where the definition of the text object is defined by XML or HTML tags.

If you are inside an HTML paragraph (denoted by <p> and </p>), and type
"dit" (without the quotes). It will delete everything inside the
paragraph, including nested tags. Using "cit" would, of course, put you
in insert mode to write a new paragraph.

Just thought I'd point that out.

G. Wade
-- 
There are two ways to write error-free programs; only the third one
works. -- Alan Perlis


More information about the Houston mailing list