Disable auto wrap long line in Visual Studio Code

后端 未结 3 523
余生分开走
余生分开走 2021-01-30 07:59

I use Visual Studio Code to write Python code with Pylint.

When I press Ctrl + S (save), the editor wraps a long line into multiple short lines. How

3条回答
  •  臣服心动
    2021-01-30 08:35

    Check your Python formatting provider.

    "python.formatting.provider": "autopep8"
    

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

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

提交回复
热议问题