Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a shortcut to jump from , e.g <XX> to </XX> ?

I already give it a try with '%' , but it doesn't work for this situation.

share|improve this question
2  
I think you'll need a plugin like matchit in order to be able to match XML tags. matchit itself seems to come with most vim distributions, but you'll still have to enable it yourself. :help matchit-install for more. –  jw013 May 9 '12 at 0:51

1 Answer 1

up vote 7 down vote accepted
  • Install the matchit plugin (see :help matchit-install for instructions).
  • Make sure automatic file-type detection and plugin-loading is enabled (:filetype plugin on).

Henceforth, whenever you edit a file detected as xml or html or some other tag-based markup language, the combination of the matchit plugin and the filetype plugin files will allow the % motion to match open and close tags.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.