Matching VIM Start / End

I am trying to find a plugin that will display the corresponding start and end instructions of Verilog. VIM works with curly brackets / brackets, but it does not work with its start / end. I want VIM to highlight the right start with the right end.

+4
source share
4 answers

In my opinion, matchit is best used. This script is part of the vim runtime and can be easily loaded by adding the following line to your .vimrc:

runtime macros/matchit.vim

A standard Verilog plugin already contains the required compliance configuration:

" Let the matchit plugin know what items can be matched.
if exists("loaded_matchit")
  let b:match_ignorecase=0
  let b:match_words=
    \ '\<begin\>:\<end\>,' .
    \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
    \ '\<module\>:\<endmodule\>,' .
    \ '\<if\>:\<else\>,' .
    \ '\<function\>:\<endfunction\>,' .
    \ '`ifdef\>:`else\>:`endif\>,' .
    \ '\<task\>:\<endtask\>,' .
    \ '\<specify\>:\<endspecify\>'
endif

, / %, , , ..

, , , , , . , , ; -, , hl_matchit. :

:help hl_matchit.txt

, Veritog filetype, vim, ifndef elsif, Verilog 2001. , verilog_systemverilog.vim, , fork , , /.

+2

. systemverilog.vim 25 :

syntax region svCase matchgroup=svConditional start="\<case\|casex\|casez\>" end="\<endcase\>" contains=ALL
  • syntax - vim (:he syntax )
  • region
  • svCase
  • matchgroup - , .
  • start end -
  • contains=ALL , .

, .

+1

, , , , html_MatchTag , HTML-, Verilog .

+1

All Articles