In my vim files, when I have a closing php tag in a string, my syntax highlighting stops at that point
Example:
<?php
... Everything good up to this point
$xml = '<?xml version="1.0"?>';
$foo = 'bar' <-- starting here I loose highlighting to the end of the file
?>
I'm running version 7.2.245. anyone have ideas why this happens? 开发者_StackOverflow社区is it only me? or is this a known bug?
Make sure you have the latest version of the runtime files, or at least the very latest version of the php syntax file.
Try using this alternative syntax file instead.
It isnt a bug, you have actually ended the PHP string. you need to just break it up. Do like "'.'?'.'>'
or something
This is normal. Notice the SO syntax highlighter stopped highlighting at that point too ;)
My windows editor does the same thing.
Even PHP's built in function works this way (or used to for a long time)
精彩评论