PHP syntax highlighting bug in gvim 7.2
In gvim 7.2 (on Windows Vista, using the default colorscheme), I found a syntax highlighting bug. I commented out a block of PHP using the HTML comment tags of !-- and --. But the PHP code was not grayed out as it is in other editors (like Topstyle). table width=100% cellpadding=2 trtd !-- ?php echo This should be grayed out, but retains syntax highlighting; ? -- ?phpecho This has proper syntax highlighting; ? /td/tr/table regards, Kurt --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: PHP syntax highlighting bug in gvim 7.2
kkruecke schrieb: In gvim 7.2 (on Windows Vista, using the default colorscheme), I found a syntax highlighting bug. I commented out a block of PHP using the HTML comment tags of !-- and --. But the PHP code was not grayed out as it is in other editors (like Topstyle). Sure this is a bug? Looks more like a feature not supported by Topstyle. table width=100% cellpadding=2 trtd !-- ?php echo This should be grayed out, but retains syntax highlighting; ? -- ?phpecho This has proper syntax highlighting; ? /td/tr/table regards, Kurt You can try (funnily enough) :let html_wrong_comments = 1 or fiddle directly with the syntax (check 'runtimepath', create subdirs as needed, :h after ): ~/.vim/after/syntax/php.vim syn clear htmlCommentPart syn region htmlCommentPart start=/--/ end=/--\s*/ contained original htmlCommentPart contains @htmlPreproc which permits highlighting of ?php ... ? No warranty ... -- Andy --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: PHP syntax highlighting bug in gvim 7.2
kkruecke wrote: In gvim 7.2 (on Windows Vista, using the default colorscheme), I found a syntax highlighting bug. I commented out a block of PHP using the HTML comment tags of !-- and --. But the PHP code was not grayed out as it is in other editors (like Topstyle). table width=100% cellpadding=2 trtd !-- ?php echo This should be grayed out, but retains syntax highlighting; ? -- ?phpecho This has proper syntax highlighting; ? /td/tr/table regards, Kurt The PHP parser doesn't know or care about HTML or XML comments, i.e. the '!--' and '--' strings are output to PHP, nothing more. So the syntax highlighting shown by Vim is correct and apparently the Topstyle editor does the wrong thing here. - Peter Odding --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---