如何在 VS Code 中启用 Python 函数参数的自动缩进 [英] How to enable auto-indentation of Python function arguments in VS Code

查看:20
本文介绍了如何在 VS Code 中启用 Python 函数参数的自动缩进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望启用 Python 函数参数的自动缩进,如下面的示例所示,使用

VS 代码

<小时>
  • VS 代码版本:1.27.2
  • Python 扩展:2018.8.0(2018 年 9 月 4 日)
<小时>

更新

  • 当前 autoIndent 设置

解决方案

这是 Python VSCode 扩展的已知问题,由于扩展 API 的限制,目前无法修复.更具体地说,编辑器中的行无法知道其他行的内容.我不知道这个问题有任何修复,但我同意它到目前为止减少了使用 VSCode 的体验.

有关更多信息,请参阅此问题:https://github.com/Microsoft/vscode-python/issues/701

I'm looking to enable automatic indentation of Python function arguments, as shown in the example below generated with use of . I had a look at a similar discussion but the discussed solutions do not appear to solve this problem.

Desired Behaviour

VS Code


  • VS Code version: 1.27.2
  • Python extension: 2018.8.0 (04 September 2018)

Update

  • Current autoIndent setting

解决方案

This is a known issue for the Python VSCode extension and it can currently not be fixed because of limitations in the extension API. More specifically the line in the editor cannot know the content of other lines. I am not aware of any fix for this issue, but I agree that it decreases the experience of working with VSCode by far.

See this issue for further information: https://github.com/Microsoft/vscode-python/issues/701

这篇关于如何在 VS Code 中启用 Python 函数参数的自动缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆