VIM jump from one xml tag to the closing one

vimxml

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.

Best Answer

  • 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.

Related Question