我正在尝试将 python 格式化程序设置为 autopep8。它已正确安装,但它从未作为 VSCode 中的格式化选项。
"python.formatting.autopep8Path": "C:\\Users\\DawsonSchaffer\\AppData\\Roaming\\Python\\Python39\\Scripts\\autopep8.exe",
"python.formatting.autopep8Args": [
"--max-line-length",
"160",
"--aggressive",
"--aggressive",
"--in-place"
],
"[python]": {
"editor.defaultFormatter": "autopep8",
},
Run Code Online (Sandbox Code Playgroud)
我已经更改了所有设置。但是我不确定要为 autopep8 添加什么。
"[python]": {
"editor.defaultFormatter": "ms-python.python",
},
or
"[python]": {
"editor.defaultFormatter": "autopep8",
},
Run Code Online (Sandbox Code Playgroud)
此外,autopep8 在控制托盘中不可用。
谢谢道森
我一直试图在我的 bash 提示符下获取 Git 状态,但没有任何成功。颜色变量有效,所以不是它们。这是我的 PS1 和解析函数。
PS1="${GREEN}ganymede@${BLUE}dawson:${ICYAN}\W${RESET}${IYELLOW} $(parse_git_branch) $ "
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
Run Code Online (Sandbox Code Playgroud)
我的 PS1 缺少什么?
谢谢道森