【问题标题】:keyboard shortcut for sublime text new versionsublime text 新版本的键盘快捷键
【发布时间】:2019-08-06 15:13:50
【问题描述】:

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

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

但是用sublime的新版本,就不行了。

怎么了?

【问题讨论】:

    标签: python python-3.x sublimetext3 sublimerepl


    【解决方案1】:

    这是代码:

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

    【讨论】:

      猜你喜欢
      • 2012-08-31
      • 2014-12-27
      • 1970-01-01
      • 1970-01-01
      • 2014-11-23
      • 1970-01-01
      • 1970-01-01
      • 2012-07-20
      • 2013-07-18
      相关资源
      最近更新 更多