SublimeText encloses lines in white rectangles

后端 未结 14 1498
情深已故
情深已故 2020-12-02 05:37

It\'s rather annoying and I can\'t seem to figure out why.

\"enter

14条回答
  •  北海茫月
    2020-12-02 06:07

    If you are using Anaconda plugin (for Python development) this is it's linting functionality - it highlights Python syntax errors and PEP8 violations.

    You can disable this feature completely or change the color of this outline by adding some custom rules to your current SublimeText theme:

    1. In Sublime Text menu: Preferences > Browser Packages...
    2. Locate source file of your current theme in opened directory (*.twTheme file with the name corresponding to the one, selected in Preferences > Color Scheme > ...)
    3. Duplicate this file, add another name (for example Tomorrow-my.tmTheme from Tomorrow.tmTheme)
    4. Paste the following code to this newly created theme file, right before tag:

      
        name
        anaconda Error Outline
        scope
        anaconda.outline.illegal
        settings
        
          background
          #FF4A52
          foreground
          #FFFFFF
        
      
      
        name
        anaconda Error Underline
        scope
        anaconda.underline.illegal
        settings
        
          background
          #FF0000
        
      
      
        name
        anaconda Warning Outline
        scope
        anaconda.outline.warning
        settings
        
          background
          #DF9400
          foreground
          #FFFFFF
        
      
      
        name
        anaconda Warning Underline
        scope
        anaconda.underline.warning
        settings
        
          background
          #FF0000
        
      
      
        name
        anaconda Violation Outline
        scope
        anaconda.outline.violation
        settings
        
          background
          #ffffff33
          foreground
          #FFFFFF
        
      
      
        name
        anaconda Violation Underline
        scope
        anaconda.underline.violation
        settings
        
          background
          #FF0000
        
      
      
    5. Adjust the colors to your needs. Save file.
    6. Select your "new" theme in Preferences > Color Scheme > and observe the changes.

    Point 3. was needed in my case because color wasn't updated immediately, after just saving theme and restarting Sublime/switching themes (sublime uses some kind of buffer?..). So, maybe you will have to repeat steps 3-6, when you want to play a little with the colors.

    Source: Anaconda's Docs

提交回复
热议问题