我正在尝试创建用于在 ST2 中打开 SublimeREPL:Ruby 窗口的键绑定,但不确定是否可以为非基本命令创建快捷方式。
我搜索了http://sublimetext.info/docs/en/reference/key_bindings.html并用谷歌搜索了我的小心脏,但找不到任何关于为外国包创建键绑定的信息。
第二个想法(我是 1y/o 开发人员) - 我决定浏览包文件。我发现这个/Users/administrator/Library/Application Support/Sublime Text 2/Packages/SublimeREPL/config/Ruby
:
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "r",
"id": "SublimeREPL",
"children":
[
{"command": "repl_open",
"caption": "Ruby",
"id": "repl_ruby",
"mnemonic": "r",
"args": {
"type": "subprocess",
"external_id": "ruby",
"encoding": "utf8",
"cmd": {"windows": ["irb.bat", "--noreadline", "--inf-ruby-mode"],
"linux": ["irb", "--noreadline", "--inf-ruby-mode"],
"osx": ["irb", "--noreadline", "--inf-ruby-mode"]},
"soft_quit": "\nexit\n",
"cwd": "$file_path",
"cmd_postfix": "\n", // postfix
"suppress_echo": true,
"syntax": "Packages/Ruby/Ruby.tmLanguage"
}
}
]
}]
}
]
我创建了键绑定:{ "keys": ["super+i", "super+r", "super+b"], "command": "repl_open" }
但没有骰子。有任何想法吗?重启ST2可以吗?