• Login
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.5k 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.
  • P
    Pete Norris
    last edited by Jun 9, 2016, 6:37 PM

    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
    • J
      Jim Dailey
      last edited by Jim Dailey Jun 9, 2016, 7:09 PM Jun 9, 2016, 7:09 PM

      @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
      • P
        Pete Norris
        last edited by Jun 10, 2016, 2:24 AM

        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
        • J
          Jim Dailey
          last edited by Jun 10, 2016, 3:44 PM

          @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
          4 out of 4
          • First post
            4/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors