visual studio code disable auto wrap long line

ε祈祈猫儿з 提交于 2019-12-20 08:46:38

问题


I use vs code to write python with pylint. When I press ctrl+S(save), the editor wrap a long line into multiple short lines. How to disable the action or configure wrap column count to 120 (default is 80)? I have tried "python.linting.pylintArgs": ["--max-line-length=120"] and "editor.wordWrapColumn": 120, but didn't work.


回答1:


Check your Python formatting provider.

"python.formatting.provider": "autopep8"

I guess in your case it is not PyLint who keeps wrapping the long lines, but autopep8.Try setting --max-line-length for autopep8 instead.

"python.formatting.autopep8Args": [
    "--max-line-length=200"
]


来源:https://stackoverflow.com/questions/47406741/visual-studio-code-disable-auto-wrap-long-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!