Unfortunately that still doesn't help the original poster, who
wanted a way of getting to the character after the > in fewer
than the three keystrokes taken to hit "w" three times.  The
only shorter sequence I can think of is "3w", unless this
operation is required so frequently that a mapping of a
function key to "f>l" would be worthwhile.

My first reply included both "fH" and "f>", which are less than the 3 keystrokes.

The OP didn't specify what was to be done once getting there. That plays into the matter significantly. If you want to change the whole tag's contents, the most efficient vim7 way is just "cit" which does the movement, deletes the contents, and puts you in insert-mode ready to make changes. That's about as optimized as one can get for that action unless it's something done so frequently that it's worthy of a mapping.

I've also had times where, while I regularly use the "fH" varient of matters to go forward to the first character in the tag, sometimes I get stung, as in

  [c]  <li>look here!</li>

(with the cursor on [c]). Using "fl" ("eff ell") in attempt to jump to the ell in "look", gets hung up on the ell in the <li> tag. It's simple to just use ";" to jump again, but it's one of those minor annoyances.

Other matters that can play into the picture include ugly/broken (non-HTML-entity-ized) tag-soup HTML with attributes such as:

  [c] <img src='foo.php?operator=>'>pipsqueek

getting to the first "p" in "pipsqueak" isn't exactly a trivial task to automate.

Just a few more thoughts...

-tim



Reply via email to