StanAngeloff / php.vim

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

Support SQL syntax in nowdoc #64

Closed Taluu closed 7 years ago

Taluu commented 7 years ago

When using heredoc (<<<TEXT ... TEXT;), the sql (or html, etc), depending on the appropriate option is colored, but that doesn't seem to be the case for the nowdoc (<<<'TEXT' ... TEXT;). I'm guessing (not tested though) that it is the same in the case of html or javascript snippets.

I tried to enable the php_sql_query option, while it worked in 'simple quoted strings', it is not working on nowdocs. Maybe this option should be extended to nowdocs, or at least using the php_sql_heredoc value here too ?