keyboard shortcut for sublime text new version

拈花ヽ惹草 提交于 2019-12-11 23:23:44

问题


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

But with the sublime's new version, it doesn't work.

What's wrong?


回答1:


This is the code:

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


来源:https://stackoverflow.com/questions/55184318/keyboard-shortcut-for-sublime-text-new-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!