1.安裝SublimeREPL:html
Ctrl+Shift+P->install package->SublimeREPLpython
2.設置SublimeREPL運行的Python環境bash
C:\Users\Xxx\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\config\Python目錄下Main.sublime-menu文件打開:調試
3.快捷鍵設定:htm
Preferences->Key Bindings,輸入以下代碼:blog
[ { "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文件。get