Community
    • Login

    PHP styling keywords

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    1 Posts 1 Posters 1.1k 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.
    • Nelson CunhaN
      Nelson Cunha
      last edited by

      Hello

      I want to highlight variables inside curly braces in PHP strings
      For example
      echo “My variable is {$myvar->myArray[$something]}”

      Currently I have the Obsidian theme, and something like this displays as the following image shows:
      http://imgur.com/a/v9eEs

      You can see that the variable inside the strings is not coloured when embraced by curly braces. The variable that’s not embraced in curly braces is highlighted though, because it has an entry in the php style configurator: the STRING VARIABLE (as you can see in the next picture).
      Now, I know that there are a lot of different keywords in PHP language that are being used in the WORD style in php language in Notepad++. Just go to langs.xml, under the “php” language with the keywords name “instre1”. It is a huge list!!!
      These keywords are hilighted as green, as you can see the in the next picture, because this “instre1” is mapped to the style WORD, in the stylers.xml file.
      http://imgur.com/a/ikSzm

      Now, I want to highlight the curly braces inside the strings, too.
      Is this possible? I believe it is achievable by these keywords, but I have no idea which one should I use.

      Thanks in advance

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