直入正题:
因为在配置python的Sublime Text环境,所以以python为例说明。
“Preference...浏览插件...SublimeREPL文件夹...Configure文件夹...Python文件夹...Default.sublime-commands”文件。
右键编辑此文件,内容如下
[ { "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" } } ]
接下来是Sublime Text的按键绑定用法,详情见按键绑定:“http://sublime-undocs-zh.readthedocs.org/en/latest/reference/key_bindings.html”
“Preference...按键绑定-用户”,全文内容如下:
[ {"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":["f4"], "caption": "SublimeREPL: Python - IPython", "command": "run_existing_window_command", "args": { "id": "repl_python_ipython", "file": "config/Python/Main.sublime-menu" }} ]
但是自动换行似乎不太好用,dir(help),输出不换行的一行。。。点击80个字符串换行,它又连回车换行符都吞了。。。。。。