How do I highlight built-in variables in PHP that are not already highlighted?
-
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.
-
@Pete-Norris You could try adding them to the Keywords section of the php Language in the langs.xml file.
-
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.
-
@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.
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