简体   繁体   中英

Sublime Text 3 - how to remove red background

How to remove that Red background in Sublime. There is some slash in that line "/" when I remove that slash red background disappears. But how do I remove that red background permanently

just providing more information on this in case someone else looks into this. As mention above, you would need to edit the XML file associated to the color scheme you're using. If you're using a theme from package control you most likely would need to utilize PackageResourceViewer to open the XML file.

Once you've located the file, you would simply need to comment out the background values for the Invalid key.

For example refer to the snippet below:

    <dict>
        <key>name</key>
        <string>Invalid</string>
        <key>scope</key>
        <string>invalid</string>
        <key>settings</key>
        <dict>
            <!--key>background</key-->
            <!--string>#ec5f67</string-->
            <key>foreground</key>
            <string>#ffffff</string>
        </dict>
    </dict>

This way you can maintain the syntax colors and suppress the annoying red highlight/background when there is an invalid syntax.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM