Community
    • Login

    How do I highlight built-in variables in PHP that are not already highlighted?

    Scheduled Pinned Locked Moved General Discussion
    4 Posts 2 Posters 2.9k Views 2 Watching
    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.
    • Pete NorrisP Offline
      Pete Norris
      last edited by

      Hello Notepad++ forum!

      Question: How do I highlight built-in variables in PHP that are not already highlighted?

      I have noticed that variables like “real_escape_string” and “num_rows” are not highlighted.

      I have got Notepad++ version 6.9.2.

      Thank you in advance.

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ Offline
        Jim Dailey
        last edited by Jim Dailey

        @Pete-Norris You could try adding them to the Keywords section of the php Language in the langs.xml file.

        1 Reply Last reply Reply Quote 0
        • Pete NorrisP Offline
          Pete Norris
          last edited by

          Jim;

          All I could find was langs.model.xml. It’s in the Notepad++ root directory (Notepad++\langs.model.xml)

          I added real_escape_string in the langs.model.xml file and it did not seem to work.

          Are there any other suggestions?

          Thanks.

          1 Reply Last reply Reply Quote 0
          • Jim DaileyJ Offline
            Jim Dailey
            last edited by

            @Pete-Norris My bad–wrong file. I have made additions to the C language section of the stylers.xml file. This allowed me to highlight various “words” with different highlighting.

            You should look for LexerType name=“php” and add your new keywords to whatever WordsStyle you want to be used to highlight them.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors