Anyone know if thereās a way to look up what command will be executed for a given key combination in a given context? Iām pressing Option-Command-Return and getting strange white dots in the gutter; donāt know what they mean or how to find out what this key combo is doing. Thanks for any tips!
Find the command associated with a key
Thatās helpful, but in this specific case it looks like itās running some kind of macro. If I hit Option-Command-Return while working in an HTML file, the output I see in the log is
no command for selector: breakUndoCoalescing
command: move_to {"to": "hardeol"}
command: move_to {"to": "hardbol"}
command: expand_selection {"to": "word"}
command: move {"by": "characters", "forward": true, "extend":true}
command: move {"by": "wordends", "forward": true, "extend":true}
command: move {"by": "words", "forward": false, "extend":true}
command: move {"by": "characters", "forward": false, "extend":true}
command: set_mark
command: delete_to_mark
command: yank
command: move_to {"to": "hardeol"}
command: left_delete
command: insert {"characters": "\n"}
command: run_macro_file {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"}
command: yank
command: expand_selection {"to": "word"}
Is there any way to tell what the ānameā of this series of commands is, what itās supposed to do?
hard to tell.
do a search across keymap files for commands bound to alt+enter or super+enter
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages && find . -name "*(OSX).sublime-keymap" -print0 | xargs -0 egrep "(super|alt)\+enter"
and check if you have something for those 3 keys.
Okay, tried that and got
./Default/Default (OSX).sublime-keymap: { "keys": "super+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
./Default/Default (OSX).sublime-keymap: { "keys": "alt+enter"], "command": "find_all", "args": {"close_panel": true},
./Default/Default (OSX).sublime-keymap: { "keys": "alt+enter"], "command": "find_all", "args": {"close_panel": true},
./Default/Default (OSX).sublime-keymap: { "keys": "ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
./Default/Default (OSX).sublime-keymap: { "keys": "alt+enter"], "command": "find_all", "args": {"close_panel": true},
I donāt see anything here bound to Option-Command-Enter or Alt-Command-Enter or Alt-Super-Enter, so I guess something else must be going on?
More generally, Iām moving to ST2 from TextMate; TM provides a way to either search for a command by name, or to type a key combination and see all commands bound to that. I thought maybe ST2 had a similar feature, but I guess not? Thanks a lot for your help in any case!
That grep vitaLee specified wonāt catch everything. Something like Default.sublime-keymap
will also be used in building the key command list (just independent of the OS).
You may also try using theFindKeyConflicts plugin, which will list commands. It will display āconflictsā or āall keysā (in your case) in either a buffer or the quick panel, giving you some additional searching capability. My guess is what ever command is running is based in a file without an OS specific extension.
ohhh, you are right skuroda.
@dang you can either try the FindKeyConflicts package or try dropping (OSX) from the grep
still not ideal as one would like but thatās what we have right now.
Only know that because I found the FindKeyConflicts plugin wasnāt working as expected when I was testing it Also realized after posting here that I never got around to adding the Quick Panel option to all keys. So thanks
At one point i thought of suggesting the FindKeyConflicts package to dang,
but then i considered that maybe it wonāt detect the binding heās looking for, because conflicts might not exist.
Understandable, there has always (okay maybe not always, but for a while) been a command to list all of the keymaps in a single buffer. I just now got around to adding the quick panel display list. FindKeyConflicts is a misleading name, but thatās what I was originally shooting for. Not really worth the trouble of changing now though. Well, letās hope that the plugin or grep will help dang solve his problem!