首先你需要安装ublimeREPL插件
1、打开你的Sublin,然后使用快捷键Crtl+Shift+P
2、键入Package Control:Install Package,点击安装,稍等片刻。
3、安装时左下角出现Loading repositories,安装完成后,键入Crtl+Shift+P,输入sublimeREPL,稍候一阵就你安装好了。
4、此时再次键入Crtl+Shift+P,输入sublimeREPL,出现sublimeREPL,则证明安装好了
5、添加快捷键,按F5执行代码:打开 首选项>快捷键设置 显示如下面板
在右侧空白输入
[ {"keys": ["f5"], "command": "run_existing_window_command", "args": {"id": "repl_python_run", "file": "config/Python/Main.sublime-menu" } } ]