2020年4月22日 星期三

[vscode] ignore E501 line too long ruler 提示與顏色修改


如果在vscode code 中 ignore E501 line too long,
想要增加個長度提示可以使用 "editor.rulers": [ 80 ],
如果要更改顏色,
"workbench.colorCustomizations": {
        "editorRuler.foreground": "#c9dfa1"
    }

Line lengths are recommended to be no greater than 79 characters. The reasoning for this comes from PEP8 itself:
Limiting the required editor window width makes it possible to have several files open side-by-side, and works well when using code review tools that present the two versions in adjacent columns.


settings.json
{
 "python.linting.pycodestyleEnabled": true,
    "python.linting.pycodestyleArgs": [
        "--ignore=E501,W605,E402",
    ],
    "python.formatting.autopep8Args": [
        "--ignore=E501,E402"
    ],
    "editor.rulers": [
        80,
        120
    ],
    "workbench.colorCustomizations": {
        "editorRuler.foreground": "#c9dfa1"
    }
}

沒有留言:

張貼留言