1.安装SublimeREPL:
Ctrl+Shift+P->install package->SublimeREPL
2.设置SublimeREPL运行的Python环境
C:UsersXxxAppDataRoamingSublime Text 3PackagesSublimeREPLconfigPython目录下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文件。