それはかなり面倒で、理由がわからないようです。
14 に答える
SublimeLinterがインストールされているようです。エラーと警告が強調表示されます。
現在のファイルの sublimetext 3 で Annaconda リンティングを無効にします。
- Cntrl + Shift + P または Mac OS X の場合は Command + shift + P でコマンド パレットに入る
- 入力
Anaconda: Disable linting on this file
してEnterキーを押します - リンティングを再度有効にするには
Anaconda: Enable linting on this file
リンティングの無効化は、セッション間で持続します。
おそらく に変更"anaconda_linter_mark_style"
してそのままにし"none"
ておくことができます。このようにして、エラーの下にアンダースコアを配置するだけで、行全体を強調表示しません。"anaconda_linter_underlines"
true
SublimeLinter を完全に無効にしたくない場合は、Syntax Specific Preferences を設定できます。
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,
}
Anaconda/Sublime ユーザー向け
私は Anaconda を持っており、lint 関数は便利ですが、すぐに使用できるスタイルは厳格です。四角形にカーソルを合わせると、適用されているルールの番号が表示されます。不要だと感じたり、コーディングの邪魔になるものを無効にすることができます。
Mac の場合:
- [設定] | [設定] に移動します。パッケージを参照 | アナコンダ | Anaconda.sublime-settings
- 「pep8_ignore」を検索
- 削除するルールを追加します。
私は次のルールをリストに入れました。これにより、速度が低下する空白のルールの一部が削除されますが、「タブなし」ルールは維持されます。
"E201",
"E202",
"E203",
"E302",
"E309",
"W291",
"W293",
"W391"
このリストを使用する場合は、ユーザー設定で "translate_tabs_to_spaces": true を設定する必要があります。
または、「pep8」を false に設定して、完全に停止することもできます。
以前の解決策がどれもうまくいかなかった場合は、次のことを試してください。
- [設定] | [設定] に移動します。パッケージ設定 | ピリンター | ユーザー設定
ファイルで、次の行を追加/変更するだけです。
"run_on_save": false, "disable_outline": true
それは私にとってはうまくいきました。私の場合、anaconda フォルダーとしてのみ、Sublime の python コンパイラーを anaconda フォルダーにある python コンパイラー (python.exe) に関連付けていました。