Is there a shortcut to jump from , e.g
I already give it a try with '%' , but it doesn't work for this situation.
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You can jump between tags using visual operators, in example:
Your cursor should jump forward to the matching closing html/xml tag. To jump backwards from closing tag, press o or O to jump to opposite tag.
Now you can either exit visual by pressing Esc, change it by c or copy by y.
To record that action into register, press qq to start recording, perform tag jump as above (including Esc), press q to finish. Then to invoke jump, press @q.
See more help at
:help visual-operators or
<tag> </tag>block (with tags)
Alternatively use plugin such as matchit.vim (See: Using % in languages without curly braces).
:help matchit-installfor instructions).
:filetype plugin on).
Henceforth, whenever you edit a file detected as
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.
matchititself seems to come with most
vimdistributions, but you'll still have to enable it yourself.
:help matchit-installfor more.