سؤال

In a c code, where code blocks are delimited by {..}, I can use "%" to move to the end of the block.

But in other languages (eg system-verilog), which uses features like:

class a;
   ...
   if(x)
     ....
   endif
endclass: a // here the ":a" is optional

how can I move from the first line of a block to its matching end line?

هل كانت مفيدة؟

المحلول

Assuming you use Vim, there is an extension called matchit.vim in macros directory in the Vim folder, or you can download latest version of it at vim.org. You can configure it yourself if it doesn't support your choice of language out-of-the-box.

Link to the plugin: http://www.vim.org/scripts/script.php?script_id=39

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top