How to disable selected brackets in GVim

I am trying to extract my own name and class name in C ++ through GVim. I read and executed the link from stackoverflow. Also check the result link

I copied the following job in my cpp.vim where the syntax directory is located.

" Highlight Class and Function names syn match cCustomParen "(" contains=cParen,cCppParen syn match cCustomFunc "\w\+\s*(" contains=cCustomParen syn match cCustomScope "::" syn match cCustomClass "\w\+\s*::" contains=cCustomScope hi def link cCustomFunc Function hi def link cCustomClass Function 

This worked, but highlight my brackets in red. How to turn off the highlighting of brackets? I deleted the .vimrc file and open the cpp file again, it is still the same. So I think this is a problem with the code above.

-------------------- Solved [Solution] --------------------

 syn match customFunc "\<[a-zA-Z_][a-zA-Z_0-9]*\>[^()]*)("me=e-2 syn match customFunc "\<[a-zA-Z_][a-zA-Z_0-9]*\>\s*("me=e-1 hi def customFunc gui=NONE guifg=#E54023 syn match cCustomScope "::" syn match cCustomClass "\w\+\s*::" contains=cCustomScope hi def link cCustomClass Function 

--------------------------- EOF ------------------- --- --------

enter image description here

+4
source share
2 answers

You must edit the .vimrc file. Just add this line to the file:

 let g:loaded_matchparen= 1 
+3
source

You did not introduce math brothers with your changes. This is the default behavior of vim. So just add

 let g:loaded_matchparen= 1 

into your .vimrc file.

0
source

All Articles