Community
    • Login

    PHP styling keywords

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    1 Posts 1 Posters 1.3k Views 1 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.
    • Nelson CunhaN Offline
      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

      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