Sublime 2 -changing background color based on file type?

后端 未结 3 1132
你的背包
你的背包 2021-01-13 06:52

Using an existing Sublime 2 color scheme, is there a way to tweak the background color selectively for eg. .js files only? Many thanks!

3条回答
  •  抹茶落季
    2021-01-13 07:25

    I was actually trying to change the background color for text files and was wondering how Riccardo figured out how to use source.js as the value for the scope.

    You need to locate the .tmLanguage file of the file type you are trying to change, which is "Plain text.tmLanguage" for text files. Then look for the scopeName key and use the value for that. This is from my "Plain text.tmLanguage" file:

    scopeName
    text.plain
    

    So, for example, to change the foreground color for text files to lime:

    
            scope
            text.plain
            settings
            
                foreground
                #00FF00
            
        
    

提交回复
热议问题