由于用sublime运行python,若是有input()函数,ctrl+b是不能输入数据的,因此下载安装了sublimeREPL进行调试。python
可是sublimeREPL没有自定义快捷键,因此只有本身设置。函数
网上不少方法可是都没有效果,最后折腾了一夜终于找到正确方式。spa
首先找到sublimerepl的配置文件。调试
步骤:Preferences-->Browse Packages-->SublimeREPL文件夹-->config文件夹-->Python文件夹-->Default.sublime-commands(以文本格式打开) code
[ { "caption": "SublimeREPL: Python", "command": "run_existing_window_command", "args": { "id": "repl_python", "file": "config/Python/Main.sublime-menu" } }, { "caption": "SublimeREPL: Python - PDB current file", "command": "run_existing_window_command", "args": { "id": "repl_python_pdb", "file": "config/Python/Main.sublime-menu" } }, { "caption": "SublimeREPL: Python - RUN current file", "command": "run_existing_window_command", "args": { "id": "repl_python_run", "file": "config/Python/Main.sublime-menu" } }, { "command": "python_virtualenv_repl", "caption": "SublimeREPL: Python - virtualenv" }, { "caption": "SublimeREPL: Python - IPython", "command": "run_existing_window_command", "args": { "id": "repl_python_ipython", "file": "config/Python/Main.sublime-menu" } } ]
这是repl的配置文件,找到你须要的命令复制下来。blog
粘贴到Preferences-->Key Bindings Userip
代码以下input
[ { "keys": ["f5"],//这是本身设的快捷键
“” "command": "run_existing_window_command", "args": { "id": "repl_python_run", "file": "config/Python/Main.sublime-menu" } } ]
最后保存就好了。io
如图class
关于sublime 每次打开更新的提示
preferences->seting user -》
{
"font_size": 13,
"update_check":false,
}
看完扫红包,月入百万