StanAngeloff / php.vim

An up-to-date Vim syntax for PHP (7.x supported)
477 stars 69 forks source link

Colorizing parenthesis #63

Closed fcojavierdomenech closed 6 years ago

fcojavierdomenech commented 7 years ago

Hi, I'd like to assign a custom colour to the parenthesis, but I can't find the way to do it.

I've tried this on my vimrc: autocmd BufRead,BufNewFile * syn match parens /[(){}]/ | hi parens ctermfg=red

also putting at the bottom of my vimrc:

function! PhpSyntaxOverride() syn match parens /[(){}]/ | hi! parens ctermfg=blue endfunction

augroup phpSyntaxOverride autocmd! autocmd FileType php call PhpSyntaxOverride() augroup END

Nothing.. no way to change it. Any hint please?

StanAngeloff commented 6 years ago

Try with the following instead:

syn match phpParentOnly "[()]" contained containedin=phpParent
hi phpParentOnly guifg=#f08080 guibg=NONE gui=NONE