Need a shortcut for finding the
end for a particular
begin in SystemVerilog syntax.
vim has a
matchit package which lets the
% key in command mode jump from a
begin to the matching
end, from a
<tag> to the matching
</tag>, etc. just as it does by default with matching braces, brackets, parentheses, etc.
To use it, you can enable the
matchit package with
Then define the matching words with
:let b:match_words = '\<begin\>:\<end\>,\<module\>:\<endmodule\>'
To use it, put the cursor on a
end while in command mode and press
% -- it will jump to the matching
% again to jump back to where you started from.
You can put those commands in your
~/.gvimrc). Notice that the
matchit package won't work if you're using vim in vi-compatible mode (with
More info is available with
:h matchit, especially about how
matchit interacts with the