You*_*Kim 141

如果您仍然对上面建议的解决方案有问题(使用anaconda lint):

通过文件菜单在用户定义的Anaconda设置文件Anaconda.sublime-settings中完全禁用linting:Sublime> Preferences> Package Settings> Anaconda> Settings - User:当它打开文件时,只需键入以下内容并将其保存; - )

{"anaconda_linting":false}

至少,它解决了我的问题.祝福(债务人)<> <

  • 更改"anaconda_linter_mark_style":"outline","none"和"anaconda_linter_underlines":true,为false - 您仍然会有显示错误的阴沟标记,但不会显示烦人的轮廓/下划线>.< (30认同)
  • @JamesBurke:我最终使用了你的建议,最终运行了linter而没有烦人的轮廓/下划线.这是我的**Anaconda.sublime-settings**文件的样子:`{"anaconda_linter_mark_style":"none","anaconda_linter_underlines":false}` (12认同)
  • 我想要具有linting功能,我只想让它只突出显示错误和/或指示排水沟中的错误,而不是围绕所有内容制作这些烦人的盒子. (4认同)

Rob*_*wie 58

看起来你已经安装了SublimeLinter.它突出了错误和警告.

  • 在我的情况下,它是anaconda插件 (51认同)
  • 这也可能是由于Anaconda,要禁用它,使用cmd + shift + p或control + shift + p,在下拉菜单中,会有一个选项,'Anaconda:禁用此文件上的linting'. (12认同)
  • control + shift + p或cmd + shift + p并键入sublimelinter并单击具有disable的那个 (8认同)
  • 注意:状态栏中显示Anaconda警告,而不是悬停工具提示. (3认同)

los*_*ost 39

在sublimetext 3中禁用Annaconda linting以获取当前文件:

  1. 通过Cntrl + Shift + P或Command + shift + P为Mac OS X输入命令调色板
  2. 键入Anaconda: Disable linting on this file并回车
  3. 重新启用linting Anaconda: Enable linting on this file

在会话之间禁用linting持续存在.

资源


fan*_*gda 33

你或许可以改变"anaconda_linter_mark_style""none"和保持"anaconda_linter_underlines"true.这样它只会将下划线置于错误之下,但不会突出显示整行.


Jac*_*Chi 9

如果您不想完全禁用SublimeLinter,可以设置语法特定首选项. Preferences -> Package Settings -> Sublime Linter -> Settings Syntax Specific User

首选项的评估类似于CSS,它是级联的.考虑最后评估的最特定于用户的特定于语法的规则.

例如:我也不喜欢白色矩形,所以我选择了填充.

 {
  /*
        Selects the way the lines with errors or warnings are marked; "outline"
        (default) draws outline boxes around the lines, "fill" fills the lines
        with the outline color, and "none" disables all outline styles
        (useful if "sublimelinter_gutter_marks" is set).
    */
    "sublimelinter_mark_style" : "fill",

    /*
        If true, lines with errors or warnings will be filled in with the
        outline color.

        This setting is DEPRECATED and will be ignored in future
        versions. Use "sublimelinter_mark_style" instead. For backwards
        compatibility reasons, this setting overrides "sublimelinter_mark_style"
        if that one is set to "outline", but has no effect if it's set to "none".
    */
    "sublimelinter_fill_outlines": false,

    // If true, lines with errors or warnings will have a gutter mark.
    "sublimelinter_gutter_marks": false,

    // If true, the find next/previous error commands will wrap.
    "sublimelinter_wrap_find": false,
}
Run Code Online (Sandbox Code Playgroud)


Sim*_*mon 7

对于Anaconda/Sublime用户

我有Anaconda和lint功能是有用的,但开箱即用,它是风格的严酷.当您将鼠标悬停在矩形上时,它会告诉您它所执行的规则的编号.您可以禁用那些您认为不需要的或在编码时妨碍的方法.

在Mac上:

  1. 转到首选项| 浏览包| 蟒蛇| Anaconda.sublime的设置
  2. 搜索"pep8_ignore"
  3. 添加要删除的规则.

我已经在我的列表中添加了以下规则,这些规则删除了一些使我失速的空白规则,但保留了"无标签"规则.

    "E201",
    "E202",
    "E203",
    "E302",
    "E309",
    "W291",
    "W293",
    "W391"
Run Code Online (Sandbox Code Playgroud)

如果您使用此列表,则需要在用户设置中设置"translate_tabs_to_spaces":true.

或者,您可以将"pep8"设置为false以完全停止它.


maq*_*maq 6

如果您使用的是Anaconda插件(用于Python开发),这就是它的linting功能 - 它突出了Python语法错误和PEP8违规.

您可以通过向当前SublimeText主题添加一些自定义规则来完全禁用此功能或 更改此大纲的颜色:

  1. 在Sublime Text菜单中: Preferences > Browser Packages...
  2. 在打开的目录中找到当前主题的源文件(*.twTheme文件,其名称对应于选中的文件Preferences > Color Scheme > ...)
  3. 复制此文件,添加另一个名称(例如Tomorrow-my.tmTheme来自Tomorrow.tmTheme)
  4. 将以下代码粘贴到此新创建的主题文件中,就 </array>标记之前:

    <dict>
      <key>name</key>
      <string>anaconda Error Outline</string>
      <key>scope</key>
      <string>anaconda.outline.illegal</string>
      <key>settings</key>
      <dict>
        <key>background</key>
        <string>#FF4A52</string>
        <key>foreground</key>
        <string>#FFFFFF</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>anaconda Error Underline</string>
      <key>scope</key>
      <string>anaconda.underline.illegal</string>
      <key>settings</key>
      <dict>
        <key>background</key>
        <string>#FF0000</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>anaconda Warning Outline</string>
      <key>scope</key>
      <string>anaconda.outline.warning</string>
      <key>settings</key>
      <dict>
        <key>background</key>
        <string>#DF9400</string>
        <key>foreground</key>
        <string>#FFFFFF</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>anaconda Warning Underline</string>
      <key>scope</key>
      <string>anaconda.underline.warning</string>
      <key>settings</key>
      <dict>
        <key>background</key>
        <string>#FF0000</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>anaconda Violation Outline</string>
      <key>scope</key>
      <string>anaconda.outline.violation</string>
      <key>settings</key>
      <dict>
        <key>background</key>
        <string>#ffffff33</string>
        <key>foreground</key>
        <string>#FFFFFF</string>
      </dict>
    </dict>
    <dict>
      <key>name</key>
      <string>anaconda Violation Underline</string>
      <key>scope</key>
      <string>anaconda.underline.violation</string>
      <key>settings</key>
      <dict>
        <key>background</key>
        <string>#FF0000</string>
      </dict>
    </dict>
    
    Run Code Online (Sandbox Code Playgroud)
  5. 根据您的需要调整颜色.保存存档.
  6. 选择您的"新"主题Preferences > Color Scheme >并观察更改.

在我的情况下需要点3.因为在保存主题并重新启动Sublime /切换主题(sublime使用某种缓冲区?...)之后颜色没有立即更新.所以,也许你需要重复步骤3-6,当你想要用颜色玩一点时.

来源:Anaconda的文档