Making the vim '%' command more useful in code like verilog

VIM % is a great time-saving team. I work in verilog and it does not have a lot of brackets. So I wanted to know if there is any mechanism thanks to which I can efficiently use % in verilog.

For instance:

  • If my cursor is under the word task , and I pass the % command, it takes me to the line where we have endtask .

  • Similarly for module - endmodule and begin - end .

This function can be really useful when we look at large verilog modules and functions.

+4
source share
1 answer

Activate the matchit plugin. This is part of the Vim distribution, but it is not activated by default. Instructions are here:: :help matchit-install .

I don't think verilog is supported, but it is relatively easy to add new definitions. See :help matchit-newlang .

+6
source

All Articles