1.安装SublimeREPL:
Ctrl+Shift+P->install package->SublimeREPL
2.设置SublimeREPL运行的Python环境
C:\Users\Xxx\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\config\Python目录下Main.sublime-menu文件打开:
3.快捷键设定:
Preferences->Key Bindings,输入如下代码:
[ { "keys": ["f5"], "caption": "SublimeREPL: Python - RUN current file", "command": "run_existing_window_command", "args": { "id": "repl_python_run", "file": "config/Python/Main.sublime-menu"} }, { "keys": ["f8"], "caption": "SublimeREPL: Python - PDB current file", "command": "run_existing_window_command", "args": { "id": "repl_python_pdb", "file": "config/Python/Main.sublime-menu"} }, ]这里定义了 F5 直接运行*.py文件,F8调试*.py文件。
参考:https://www.cnblogs.com/JackyXu2018/p/8821482.html
转载于:https://www.cnblogs.com/i-hard-working/p/11195583.html