问题
Background: I am working on an SML file on SublimeText3 with build system setup.
After a build, i can successfully jump to the first error using the F4
key. I want to add another key mapping for the same "Next Result" command eg:Cmd+N
in Vintage mode.
- What should i add as in my keybindings file to achieve this?
- What documentation,file did you refer/look around to find the proper answer for question 1? What was your thought process in brief to figure it out ?
edit: changed the required keybinding from <leader>cn
to Cmd+N
to make things easier
回答1:
You can find the command being called on a default key-binding in the default key bingings file. This file is opened using the menu:
Preferences > Key Bindings - Default
Inside this file you must find the entry corresponding to the keys you are looking for, in this case f4
key is mapped to next_result
command as you can see in the key binding:
{ "keys": ["f4"], "command": "next_result" }
回答2:
For future reference, you can type sublime.log_commands(True)
into the Sublime console and then the command name of every action you do will get printed to the console. Once you get the command name you need, you can stop the command printing with sublime.log_commands(False)
来源:https://stackoverflow.com/questions/31444121/sublimetext-how-to-find-the-command-for-next-build-result-to-map-it-to-a-diff