Disable auto wrap long line in Visual Studio Code

后端 未结 3 521
余生分开走
余生分开走 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:39

    When using custom arguments, each top-level element of an argument string that's separated by space on the command line must be a separate item in the arguments list. For example:

    "python.formatting.autopep8Args": ["--max-line-length", "120", "--experimental"], "python.formatting.yapfArgs": ["--style", "{based_on_style: chromium, indent_width: 20}"], "python.formatting.blackArgs": ["--line-length", "100"]

    For proper formatting of these Python settings you can check Formatter-specific settings:

    Also check the answers here:

    Allow statements before imports with Visual Studio Code and autopep8

提交回复
热议问题