I am at present writing a syntax file in VIM for the script language I use, which isn’t a generic language like c.
One of the block syntaxes is the do..loop structure as below:
DO
blah blah blah
LOOP times, label
I wonder that if there is a way for me to make the cursor go back and forth around DO and LOOP like in c I press % then the cursor moves during “{” and “}”.
Thanks a lot.
You can use the
matchitplugin to define additional pairs of block start and end keywords to jump to with%. For your case something likeshould work. To keep your setup tidy you should define this in an new filetype plugin.
The
matchitdocumentation has an extra chapter|matchit-newlang|devoted to this topic.