1) SublimeREPL 绑定F5快捷键,快速运行Python程序
Sublime3 在安装完成SublimeREPL插件后,进行键位绑定:
Preferences->按键绑定-用户,粘贴以下代码,并保存.
{"keys":["f5"], "caption": "SublimeREPL: Python - RUN current file", "command": "run_existing_window_command", "args": {"id": "repl_python_run","file": "config/Python/Main.sublime-menu"} }
2) 当点击F5程序时,右侧REPL窗口会显示执行结果,但当多次连续点击F5之后,右侧窗口会报错:
C:\Program Files\Python36\python.EXE: can't open file '$file_basename': [Errno 2] No such file or directory
***Repl Closed***
网上资料说,设置sublimeREPL的User配置项:
Preferences==>Package-Settings==>SublimeREPL==>Settings-User
{
"default_extend_env": {"PATH": "{PATH}:YourPythonDirPath"}
}