Wikia

Vim Tips Wiki

Changes: Script:1571

Edit

Back to page

(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 2: Line 2:
   
 
==Comments==
 
==Comments==
I have v0.9.7 installed, and seems it gets out of sync when function header includes comment in a class:
+
I have v0.9.7 installed, and seems it gets out of sync when function header includes comment in a class:
 
<pre>
 
<pre>
 
<?php
 
<?php
Line 16: Line 16:
 
Another bug in v0.9.7, the following code incorrectly shows error highlighting:
 
Another bug in v0.9.7, the following code incorrectly shows error highlighting:
 
<pre>
 
<pre>
<?
+
<?
 
while ($row) {
 
while ($row) {
 
?>
 
?>

Latest revision as of 09:41, July 14, 2012

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.

Around Wikia's network

Random Wiki