崇高的文本键盘快捷键绑定不起作用

Cap*_*rog 13 keyboard-shortcuts r sublime-text-2

按照此处的说明,我已经设置了一个新的 SublimeText 安装以与 R 一起使用。我没有安装其他 SublimeText 插件。使用上述链接中的说明设置的键盘快捷键不起作用。我已经按照教程中的说明设置了我的用户密钥绑定文件。

“默认”键绑定文件中没有冲突的键绑定。

尽管如此,我可以通过单击菜单在 REPL 中执行我的 R 代码:

工具 > SublimeREPL > REPL 中的 Eval > 选择 ( Ctrl+ Shift+ R)

如果我真的按下Ctrl+ Shift+R快捷方式,则什么也不会发生。

这是我的用户密钥绑定文件的副本:

[
// Modified Sublime-REPL keybindings for an "R-friendly" set of shortcuts.
// For more information, see http://tomschenkjr.net/2012/05/17/using-sublime-text-2-for-r/

// Executes a selection of text in REPL, latter only displays code and does not execute
{ "keys": ["ctrl+shift+r"], "command": "repl_transfer_current", "args": {"scope": "selection"}},
{ "keys": ["ctrl+shift+r", "r"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}},

// Executes the entire file (build) in REPL, latter only displays code and does not execute
{ "keys": ["ctrl + f7"], "command": "repl_transfer_current", "args": {"scope": "file"}},
{ "keys": ["ctrl + f7", "r"], "command": "repl_transfer_current", "args": {"scope": "file", "action":"view_write"}},

// Executes line(s) of text in REPL terminal, latter only displays code and does not execute
{ "keys": ["ctrl+alt+r"], "command": "repl_transfer_current", "args": {"scope": "lines"}},
{ "keys": ["ctrl+alt+r", "r"], "command": "repl_transfer_current", "args": {"scope": "lines", "action":"view_write"}},

// Executes a block (e.g., a custom function) of text in REPL terminal, latter only displays code and does not execute
{ "keys": ["ctrl+shift+alt+r"], "command": "repl_transfer_current", "args": {"scope": "block"}},
{ "keys": ["ctrl+shift+alt+r", "r"], "command": "repl_transfer_current", "args": {"scope": "block", "action":"view_write"}}

]
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

小智 0

这有一个简单的解决方案。配置文件中有错误,只需删除shift+ctrl+r,r这一行:

[
// Modified Sublime-REPL keybindings for an "R-friendly" set of shortcuts.
// For more information, see http://tomschenkjr.net/2012/05/17/using-sublime-text-2-for-r/

// Executes a selection of text in REPL, latter only displays code and does not execute
{ "keys": ["ctrl+shift+r"], "command": "repl_transfer_current", "args": {"scope": "selection"}},

// Executes the entire file (build) in REPL, latter only displays code and does not execute
{ "keys": ["ctrl + f7"], "command": "repl_transfer_current", "args": {"scope": "file"}},


// Executes line(s) of text in REPL terminal, latter only displays code and does not execute
{ "keys": ["ctrl+alt+r"], "command": "repl_transfer_current", "args": {"scope": "lines"}},


// Executes a block (e.g., a custom function) of text in REPL terminal, latter only displays code and does not execute
{ "keys": ["ctrl+shift+alt+r"], "command": "repl_transfer_current", "args": {"scope": "block"}},


]
Run Code Online (Sandbox Code Playgroud)