Sublime Text 2: how to change white space characters color?

后端 未结 4 1023
一整个雨季
一整个雨季 2021-02-20 11:59

The color seems to be linked to the foreground in themes. I assume it\'s using less alpha. Is there a way to control this?

4条回答
  •  野性不改
    2021-02-20 12:56

    A few years later, I was struggling with this in Sublime Text 3 build 3083. I hope this helps anyone. In addition to Chris Like's suggestion to install PersistentRegexHighlight and setting "draw_white_space": "all" in the user preferences and the pattern to one or more occurances of tabs and spaces, i.e. [ \t]+ in the PersistentRegexHighlight user settings, i had to also also set "color_scope": "highlight.whitespace" and add the following dict to the theme along with the other ones in the settings array:

    
      name
      highlight.whitespace
      scope
      highlight.whitespace
      settings
      
        background
        #020202
        foreground
        #805050
      
    
    

    which by the way oddly only outlines in red if the background is set to black, i.e #000000

    Note that this method does not require editing any syntax files.

提交回复
热议问题