Fandom

Vim Tips Wiki

Script:1571

1,624pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Use this page to discuss script 1571 php: PHP syntax

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

CommentsEdit

I have v0.9.7 installed, and seems it gets out of sync when function header includes comment in a class:

<?php
class foobar {
    public function /* array */ blah($id)
    {
        echo ("foo");
    }
};


Another bug in v0.9.7, the following code incorrectly shows error highlighting:

<?
 while ($row) {
?>

  <a href="./events/events.php?eventId=<?=$eventId?>"><img src="<?=$imageBanner?>" style="border:1px solid #000;" alt="<?$title?>"></a><br>

<? } ?>


I've noticed another bug where the syntax highlighting will disable itself until you scroll to the top of the file again

<script type="text/javascript">
var x = '<?php echo 'hello' ?>';

//
// Pad the file with empty comments
//
</script>

Open a new split and switch to the new buffer while the top of the file is off the screen and the highlighting will change. Switch back to the file and scroll up and it'll be re-applied.

Also on Fandom

Random Wiki