Sublime Text新版本的键盘快捷键 [英] keyboard shortcut for sublime text new version
本文介绍了Sublime Text新版本的键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下代码来创建在sublimeREPL
中运行当前文件的快捷方式:
I have this code to create a shortcut to run current file in sublimeREPL
:
{
"keys": ["ctrl+alt+b"],
"command": "run_existing_window_command",
"args": {
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
}
但是使用sublime的新版本,它不起作用.
But with the sublime's new version, it doesn't work.
怎么了?
推荐答案
这是代码:
{
"keys": ["ctrl+alt+b"],
"command": "repl_open",
"args": {
"cmd": ["python", "-u", "-i", "$file_basename"],
"cwd": "$file_path",
"encoding": "utf8",
"extend_env": {"PYTHONIOENCODING": "utf-8"},
"external_id": "python",
"syntax": "Packages/Python/Python.tmLanguage",
"type": "subprocess"
}
}
这篇关于Sublime Text新版本的键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文