Sublime Text新版本的键盘快捷键

时间:2019-03-15 14:01:04

标签: python python-3.x sublimetext3 sublimerepl

我有这段代码可以创建一个快捷方式来运行sublimeREPL中的当前文件:

{
    "keys": ["ctrl+alt+b"],
    "command": "run_existing_window_command",
    "args": {
        "id": "repl_python_run",
        "file": "config/Python/Main.sublime-menu"
    }
}

但是使用sublime的新版本,它不起作用。

怎么了?

1 个答案:

答案 0 :(得分:0)

这是代码:

{
  "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"
  }
}