直入正題:
因?yàn)樵谂渲胮ython的Sublime Text環(huán)境,所以以python為例說(shuō)明,。
“Preference...瀏覽插件...SublimeREPL文件夾...Configure文件夾...Python文件夾...Default.sublime-commands”文件,。
右鍵編輯此文件,內(nèi)容如下
- [
- {
- "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"
- }
- }
- ]
這就分別對(duì)應(yīng)著“工具...SublimeREPL...Python”下的幾個(gè)命令,。
接下來(lái)是Sublime Text的按鍵綁定用法,詳情見(jiàn)按鍵綁定:“http://sublime-undocs-zh./en/latest/reference/key_bindings.html”
“Preference...按鍵綁定-用戶(hù)”,全文內(nèi)容如下:
- [
- {"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"
- }}
- ]
分別代表用 F5綁定repl_python_run,,即運(yùn)行當(dāng)前文件。F6綁定IPython模式,,就是command line模式,。
但是自動(dòng)換行似乎不太好用,dir(help),,輸出不換行的一行,。。,。點(diǎn)擊80個(gè)字符串換行,,它又連回車(chē)換行符都吞了,。。,。,。。,。
|