PHP syntax syntax in high text

I have syntax highlighting problems in the following cases:

enter image description here

How can I get the variables highlighted when mixed with strings?

+4
source share
2 answers

You just need to have a color scheme with the correct areas. For example, a similar code looks like this with the Neon Color Scheme :

PHP $ var in string

+3
source

I use this kind of highlighting: enter image description here

This helps me a lot when php code along with other html code.

You have to edit your theme .tmTheme file since my Monokay.tmTheme so right after the command </array>I used the code above:

    <dict>
        <key>scope</key>
        <string>punctuation.section.embedded.begin.php</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#FF0000</string>
        </dict>
    </dict>

    <dict>
        <key>scope</key>
        <string>punctuation.section.embedded.end.php</string>
        <key>settings</key>
        <dict>
            <key>foreground</key>
            <string>#FF0000</string>
        </dict>
    </dict>
+1

Source: https://habr.com/ru/post/1546620/


All Articles