Harvey
Harvey

Reputation: 75

How do I edit highlighting for built-in functions for PHP in Notepad++?

Question: Can someone tell me where to add, in Notepad++, syntax highlighting for built-in functions in PHP?

There are a few built-in functions in PHP that Notepad++ does not highlight. One I have noticed is "real_escape_string."

The langs.model.xml file includes the words to be highlighted with the languages supported by Notepad++.

The langs.model.xml file is found at C:\Program Files\Notepad++\langs.model.xml

At the top of that file it says the following: "The key words of the supported languages, don't touch them!"

I edited the file anyway. I included "real_escape_string" within keywords in the PHP section. It did not work. The real_escape_string function was not highlighted.

I cannot find a way to add syntax highlighting for built-in functions from the user interface.

Under "Settings -> Preferences" I have looked at all the options and there is no option to edit syntax highlighting

Under "Settings -> Style Configurator" there's no place to edit syntax highlighting

Thank you in advance.

Upvotes: 1

Views: 234

Answers (1)

SML
SML

Reputation: 1265

%appdata%/Roaming/Notepad++/langs.xml

Keywords for PHP are located around line 172

Add the keywords that you wish to highlight between the <keywords> <keywords?> tags then restart notepad++

Upvotes: 2

Related Questions