标题说明了一切,构建取消什么都不做,命令托盘什么都不做,键绑定什么都不做。我已经用这个更改了 prefrences 的键绑定:
{ "keys": ["ctrl+alt+c"], "command": "cancel_build" },
我添加了自己的 Python 终端构建:
{
"target": "terminus_exec",
"cancel": "terminus_cancel_build",
"focus": true,
"cmd": ["python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"env": {"PYTHONIOENCODING": "utf-8"},
"windows": {
"cmd": ["py", "-u", "$file"],
},
"variants":
[
{
"name": "Syntax Check",
"cmd": ["python3", "-m", "py_compile", "$file"],
"windows": {
"cmd": ["py", "-m", "py_compile", "$file"],
}
}
]
}
(我对崇高文本和编码真的很陌生)提前致谢。编辑:我使用的是 Windows 10,在 python 安装程序中,我选择了添加到 PATH 选项并且更改键绑定没有任何作用。我用它作为我的测试文件:
while True:
print("Stop it!")