sublime设置sublimeREPL-python-run current file 快捷键

时间:2022-06-19 02:58:29

弄了3个小时的快捷键,一直不能成功使用,百度上一堆一样的方法,最后*才找到能用的方法,真是服了。

方法:

①首选项->快捷键设置

填写如下内容:

sublime设置sublimeREPL-python-run current file 快捷键

[

{"keys": ["ctrl+b"], "command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "d",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["C:\\Users\\giova\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe", "-u", "-i", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}}
]

注意:cmd中的路径,修改为你本机python.exe文件路径

保存后,重新启动就可以了

sublime设置sublimeREPL-python-run current file 快捷键

这个两行显示,是在视图--》布局--》行 2 选择的,也可以选择列2