Community
    • Login

    colour matching braces/brackets does not work in php

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 122 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Guy PrzytulaG
      Guy Przytula
      last edited by

      using notepad++ 8.9.1 on windows
      wanted to change the matching brackets in a php file
      settings-style config
      if global styles is selected : you can define colour - i changed for matching or not
      but I edit a php file and there the colour is not applied
      i even changed the extension to txt and curly brackets are not highlighted
      am i missing something ?
      best regards, Guy

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @Guy Przytula
        last edited by

        @Guy-Przytula ,

        Brace-match highlighting works for me:
        9c4d9b7c-f494-4a19-bd0c-2c8d3d4715aa-image.png

        Can you be more specific as to what’s going wrong for you? Set up a screenshot like mine, maybe?

        Guy PrzytulaG 1 Reply Last reply Reply Quote 0
        • Guy PrzytulaG
          Guy Przytula @PeterJones
          last edited by

          @PeterJones 2026-02-20_11h44_40.png
          thanks for the update
          image as requested
          best regards, Guy

          PeterJonesP 1 Reply Last reply Reply Quote 1
          • PeterJonesP
            PeterJones @Guy Przytula
            last edited by PeterJones

            @Guy-Przytula ,

            To the best of my ability to mimic your setup, it’s working:
            ce5aedc3-4643-44b7-991b-a0202fc0c244-image.png

            But I notice your colors are different, despite being “Default (stylres.xml)”, so I think either you’ve updated over the years, and the stylers.xml started from a much older one, or you’ve customized some colors. I would think the latter, but Global Override isn’t at the beginning of the Style list, so it’s a reasonably-recent starting point for your stylers.

            The slight difference in your yellow vs my super-pale yellow isn’t a problem. But it’s looking like you’re not getting any foreground color variation, where for me, the <?php is red, //util comment is green, function keyword is blue, and normal text is black… but yours appears to be using black foreground for all text – which indicates that you might have a Global Override on:
            Could you check Language: Global Styles > Style: Global Override? Because if you have any of the Global Override’s set (my guess is that you have “Force foreground color for all styles”), then it will behave like that. And if you are overriding the foreground colors, then it stands to reason that the foreground color on brace-match highlighting is not showing up.

            Because when I look at your screenshot, the { and the matching } are both bold, but not red. So the highlighting is working partially (it’s adding the bold) but not completely (not changing the foreground color).

            yes, using Global Overrides, I can get a pretty-close mimic of your screenshot, including bold-but-not-red for the brace-matching:
            f45ff870-4d06-49bc-ada3-ea580819ea33-image.png

            If I turn those Global Overrides off, it goes back to what I showed above:
            f2790f4a-aaf6-4e89-8891-a163459683de-image.png

            So my current working theory is that you’re using Global Overrides on the colors. If you want to be able to use the syntax highlighting colors for brace-matching, you need to not have the Global Override on colors.

            Guy PrzytulaG 1 Reply Last reply Reply Quote 1
            • Guy PrzytulaG
              Guy Przytula @PeterJones
              last edited by

              @PeterJones yes, many thanks : global override was the cause
              now all highlighting is correct as set/wanted
              best regards, Guy

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors