Vim %
operator jumps to matching parentheses, comment ends and a few other things. It doesn\'t, however, match XML tags (or any other tag, to the best of my kn
The OP stated that what he really wanted to do is copy a section of XML without having to find the matching tag. This is easily done in normal mode with yat
, which yanks the text inside and including the matching tags, then pastes it. yit
is almost the same, but it doesn't include the outer tags.
The 'y' in the string is of course the normal mode "yank" command. (:help y
)
a
or i
can be used for object selection after an operator such as y
or inside a visual selection. The symbol after a
or i
specifies what should be selected. The object type t
used here indicates an SGML tag. (:help object-select
).
Of course
just means to move somewhere by the means of your choice and p
puts the yanked text at that location.