Loading ...
Sorry, an error occurred while loading the content.

Problem with PHP syntax highlighting

Expand Messages
  • Jose Miguel PĂ©rez
    Hi All! I don t know if this was already addressed, but I think the syntax highlighting has many apparent bugs. I wish to know if this is already in the to
    Message 1 of 7 , Sep 13, 2002
    • 0 Attachment
      Hi All!

      I don't know if this was already addressed, but I think the syntax
      highlighting has many apparent bugs. I wish to know if this is already in
      the "to do" list.

      I've found many bugs, but I'll point two or three of them here. What I'd
      like was to send some screen captures so that you all can see the "bugs" or
      I may be doing something wrong. Here it goes:

      A) The most evident (I don't know if occurs outside PHP highlighting) is
      that the quotes for "string" don't span more than one line. For example:

      "This line got highlighted
      but this goes out of scope."

      The two lines above must be highlighted, not the first one. I have tried
      to put a backslash to the end of the first line (Like the C multiline string
      terminator) but to no avail. I suppose this is a bug because Edit+ already
      have multiline comments, which is pretty much the same.

      B) The syntax parser get fooled with <script> tags. Note that no HTML
      tag has anything to do with PHP, so the parser must remain in PHP "mode".
      For example:

      <script>
      <?php
      echo "This don't even get parsed as PHP";
      ?>
      </script>

      The construct above don't get PHP highlighted, as normaly would. If you
      delete the two <script> tags, the lines get highlighted as spected.

      C) The third most apparent bug, or at least a "lack of feature" :-) is
      the impossibility to change font properties so basics as "bold" or "italic".
      I know a syntax highlighter is not a text editor, but I'm not talking about
      changes in "Helvetica" or "Courier" here. I'm the one which don't like
      seeing the code as a kaleidoscope, I like the slight changes to bold in a
      keyword, by instance.

      This is all for now. ;-)

      Thanks for your patience and sorry about the poor english.
      Jose Miguel.
    • Rod K
      ... From: Jose Miguel Perez [mailto:jruiz@lmental.com] Sent: Friday, September 13, 2002 3:07 PM To: editplus@yahoogroups.com Subject: [edit+] Problem with PHP
      Message 2 of 7 , Sep 13, 2002
      • 0 Attachment
        -----Original Message-----
        From: Jose Miguel Perez [mailto:jruiz@...]
        Sent: Friday, September 13, 2002 3:07 PM
        To: editplus@yahoogroups.com
        Subject: [edit+] Problem with PHP syntax highlighting


        A) The most evident (I don't know if occurs outside PHP highlighting)
        is
        that the quotes for "string" don't span more than one line. For example:

        "This line got highlighted
        but this goes out of scope."

        The two lines above must be highlighted, not the first one. I have
        tried
        to put a backslash to the end of the first line (Like the C multiline
        string
        terminator) but to no avail. I suppose this is a bug because Edit+ already
        have multiline comments, which is pretty much the same.

        It's in help. Change your php.stx file:

        #CONTINUE_QUOTE
        This option allows un-terminated quotation to be continued to next line.
        'y' for yes and 'n' for no. 'n' is default value.


        B) The syntax parser get fooled with <script> tags. Note that no HTML
        tag has anything to do with PHP, so the parser must remain in PHP "mode".
        For example:

        <script>
        <?php
        echo "This don't even get parsed as PHP";
        ?>
        </script>

        The construct above don't get PHP highlighted, as normaly would. If
        you
        delete the two <script> tags, the lines get highlighted as spected.

        You might want to make this a feature request, it really isn't a bug. E+
        just assumes that what's between <script> tags is Javascript (or VBscript
        depending on your settings). Sangil probably has never thought of embedding
        PHP in Javascript.

        C) The third most apparent bug, or at least a "lack of feature" :-) is
        the impossibility to change font properties so basics as "bold" or
        "italic".
        I know a syntax highlighter is not a text editor, but I'm not talking
        about
        changes in "Helvetica" or "Courier" here. I'm the one which don't like
        seeing the code as a kaleidoscope, I like the slight changes to bold in a
        keyword, by instance.

        This is all for now. ;-)

        Thanks for your patience and sorry about the poor english.
        Jose Miguel.

        Yes it's a feature request. You'll have to send an email to Sangil.


        [Non-text portions of this message have been removed]
      • wdzzzz
        I recently noticed that EditPlus is incorrectly coloring some variables in my PHP scripts. It seems that the color for Built-in functions is overriding
        Message 3 of 7 , Jan 31, 2005
        • 0 Attachment
          I recently noticed that EditPlus is incorrectly coloring some
          variables in my PHP scripts. It seems that the color for "Built-in
          functions" is overriding "Variables." For example, variables named
          $count or $str_replace would be colored differently than other
          variables.

          I'm currently using version 2.12 (183). In older versions (before
          build 147 at least), this problem did not occur. Does anyone know
          what's causing this, or how to possibly solve it? Or is it a bug?

          Thanks.
        • tailing_loop2003
          Hi, I m using version 2.12(76) and all my vars are teal--even though count and str_replace are reserved words. If you want to post your question over at the
          Message 4 of 7 , Feb 1, 2005
          • 0 Attachment
            Hi,

            I'm using version 2.12(76) and all my vars are teal--even though count
            and str_replace are reserved words. If you want to post your question
            over at the EditPlus forum:

            http://www.machak.com/editplus/

            I'd be happy to compare settings with you, and see if we can figure
            something out, or I can even post a copy of my php.stx file to see if
            mine would cure the problem.


            --- In editplus@yahoogroups.com, "wdzzzz" <wdz1@s...> wrote:
            >
            >
            > I recently noticed that EditPlus is incorrectly coloring some
            > variables in my PHP scripts. It seems that the color for "Built-in
            > functions" is overriding "Variables." For example, variables named
            > $count or $str_replace would be colored differently than other
            > variables.
            >
            > I'm currently using version 2.12 (183). In older versions (before
            > build 147 at least), this problem did not occur. Does anyone know
            > what's causing this, or how to possibly solve it? Or is it a bug?
            >
            > Thanks.
          • wdzzzz
            ... Well, I don t think the problem exists in build 76. Like I said in my first message, I m currently using build 183 (the bug patch from 2005- 01-08). In
            Message 5 of 7 , Feb 1, 2005
            • 0 Attachment
              --- In editplus@yahoogroups.com, "tailing_loop2003"
              <tailing_loop2003@y...> wrote:
              >
              > Hi,
              >
              > I'm using version 2.12(76) and all
              > my vars are teal--even though count
              > and str_replace are reserved words.
              >

              Well, I don't think the problem exists in build 76. Like I said in my
              first message, I'm currently using build 183 (the bug patch from 2005-
              01-08). In older versions (before build 147 at least), this problem
              did not occur.
            • crash0v3r
              I will confirm this bug in build 183. naming a variable $key in PHP code will color the work key in red (PHP functions) Laurent
              Message 6 of 7 , Feb 17, 2005
              • 0 Attachment
                I will confirm this bug in build 183.
                naming a variable $key in PHP code will color the work key in red (PHP
                functions)

                Laurent

                --- In editplus@yahoogroups.com, "wdzzzz" <wdz1@s...> wrote:
                >
                >
                > I recently noticed that EditPlus is incorrectly coloring some
                > variables in my PHP scripts. It seems that the color for "Built-in
                > functions" is overriding "Variables." For example, variables named
                > $count or $str_replace would be colored differently than other
                > variables.
                >
                > I'm currently using version 2.12 (183). In older versions (before
                > build 147 at least), this problem did not occur. Does anyone know
                > what's causing this, or how to possibly solve it? Or is it a bug?
                >
                > Thanks.
              • jaguarcy
                This problem can be easily fixed by modifying the stx file. Where it says: #KEYWORD=Reserved words Replace that with: #KEYWORD=Variables ; Color all prefixed
                Message 7 of 7 , Feb 24, 2005
                • 0 Attachment
                  This problem can be easily fixed by modifying the stx file. Where it says:

                  #KEYWORD=Reserved words

                  Replace that with:

                  #KEYWORD=Variables
                  ; Color all prefixed variables correctly
                  ; by giving precedence to variables over
                  ; reserved words and built-in functions

                  #KEYWORD=Reserved words


                  And then change #PREFIX3=$ to #PREFIX1=$

                  Following that you'll have to redefine the colors in the color list,
                  so that the 'Variables' is colored correctly, etc. This will give
                  variables precedence over reserved words and built-in functions when
                  highlighting.

                  HOWEVER, along these lines, with the new bug fix i've noticed a
                  problem with autocomplete. For example i have the built-in function
                  'key' autocomplete to key(^!). However when I type $key to reference a
                  variable I defined, then it still autocompletes. Is there a way to
                  make the $ be part of the word, or turn autocomplete off when the word
                  is prefixed with $ ????

                  --- In editplus@yahoogroups.com, "crash0v3r" <crash0v3r@y...> wrote:
                  >
                  > I will confirm this bug in build 183.
                  > naming a variable $key in PHP code will color the work key in red (PHP
                  > functions)
                  >
                  > Laurent
                  >
                  > --- In editplus@yahoogroups.com, "wdzzzz" <wdz1@s...> wrote:
                  > >
                  > >
                  > > I recently noticed that EditPlus is incorrectly coloring some
                  > > variables in my PHP scripts. It seems that the color for "Built-in
                  > > functions" is overriding "Variables." For example, variables named
                  > > $count or $str_replace would be colored differently than other
                  > > variables.
                  > >
                  > > I'm currently using version 2.12 (183). In older versions (before
                  > > build 147 at least), this problem did not occur. Does anyone know
                  > > what's causing this, or how to possibly solve it? Or is it a bug?
                  > >
                  > > Thanks.
                Your message has been successfully submitted and would be delivered to recipients shortly.