Key map sublimeREPL commands in Sublime Text 2

I am trying to map keyboard shortcuts for SublimeREPL plugin commands. Looking at SublimeREPL, it looks like a menu command, defined as:

Default.sublime-commands {"caption": "SublimeREPL: SBT for the open folder", "command": "run_existing_window_command", "args": {"id": "repl_sbt", "file": "config / Scala / Main .sublime-menu "}}

or

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

I tried to do a key binding in my SublimeREPL.sublime settings to:

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

But when I try to use it, the Sublime console simply says:

no command for selector: noop:

Same thing if I match it with:

 [{ "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" } }] 
+4
source share
1 answer

Your first keyword is correct and should work as expected. The place is in Preferences → Key bindings - User .

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

based on your description, I suspect some other command is capturing super + shift + k.

 >>> sublime.log_commands(True) 

let you see what is caused when.

+5
source

Source: https://habr.com/ru/post/1448071/


All Articles