gpt4 book ai didi

sublimetext2 - Sublime Text 2 中的键映射 sublimeREPL 命令

转载 作者:行者123 更新时间:2023-12-05 01:16:36 24 4
gpt4 key购买 nike

我正在尝试为 SublimeREPL 插件命令映射键盘快捷键。查看 SublimeREPL 看起来菜单项命令定义为:

Default.sublime-commands
{
"caption": "SublimeREPL:打开文件夹的 SBT",
“命令”:“run_existing_window_command”,“参数”:
{
“id”:“repl_sbt”,
"file":“配置/Scala/Main.sublime-menu”
}
}

或在

Main.sublime-menu

               {"command": "repl_open",
"caption": "SBT for opened folder",
"id": "repl_sbt",
"mnemonic": "b",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "scala",
"cmd": {"linux": ["sbt"],
"osx": ["sbt"],
"windows": ["sbt"]},
"soft_quit": "\nexit\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
"linux": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
"windows": {"EMACS": "1"}},
"suppress_echo": false,
"syntax": "Packages/Scala/Scala.tmLanguage"
}
}

我尝试在我的 SublimeREPL.sublime-settings 中进行键绑定(bind):
[{ "keys": ["super+shift+k"], "command": "run_existing_window_command", "args":
{
"id": "repl_sbt",
"file": "config/Scala/Main.sublime-menu"
}
}]

但是当我尝试使用它时,Sublime 控制台只会说:

no command for selector: noop:



如果我将其映射到:
[{ "keys": ["super+shift+k"],  "command": "repl_open",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "scala",
"cmd": {"linux": ["sbt"],
"osx": ["sbt"],
"windows": ["sbt"]},
"soft_quit": "\nexit\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
"linux": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
"windows": {"EMACS": "1"}},
"suppress_echo": false,
"syntax": "Packages/Scala/Scala.tmLanguage"
}

}]

最佳答案

您的第一个键绑定(bind)是正确的,应该可以按预期工作。地点在首选项 -> 键绑定(bind) - 用户 文件。

[{ "keys": ["super+shift+k"], "command": "run_existing_window_command", "args":
{
"id": "repl_sbt",
"file": "config/Scala/Main.sublime-menu"
}
}]

根据您的描述,我怀疑其他一些命令正在劫持 super+shift+k。
>>> sublime.log_commands(True)

会让你看到什么时候被调用。

关于sublimetext2 - Sublime Text 2 中的键映射 sublimeREPL 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13539387/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com