StanAngeloff / php.vim

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

Php doc(#28) #29

Closed ghost closed 10 years ago

StanAngeloff commented 10 years ago

I'm happy to merge the addition of new doc tags, however I'm not sold on linking to different highlighting groups.

I feel the default should be to have all comments appear as a single highlighting group (much like in Java, Python, etc.) Any syntax file can then choose to re-link the groups.

ghost commented 10 years ago

But if I don't want to have a separate colors for each framework/CMS? Maybe an option, then? Or state somewhere in README or wiki page that you have to override the colors in .vimrc? At first I thought it's a bug, btw.

StanAngeloff commented 10 years ago

You don't need to have separate colours per framework/CMS. Once set in .vimrc or in your colorscheme it will persist across all .php files.

I agree, better documentation of the available highlighting groups will be helpful.

ghost commented 10 years ago

We could use this as example of overriding colors somewhere:

" put this at the very end of your vimrc
fu! SetPhpDocHighlight()
  hi! def link phpDocTags          phpDefine
  hi! def link phpDocParam         phpType
endfu

augroup phpSynOverride
  au!
  au FileType php call SetPhpDocHighlight()
augroup END