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 knowledge).
What’s the best way to jump to the matching XML tag using Vim?
Note: What I really want to do is duplicate a section in an XML file without manually looking for the matching tag.
There is a vim plugin called matchit.vim . You can find it here: http://www.vim.org/scripts/script.php?script_id=39 . It was created pretty much the exact purpose you describe.
Install that, place your cursor on the body of the tag (not the <>, else it’ll match those) and press % to jump to the other tag. See the script’s page to find out what else it matches.