Problem
A macro that tries to capture the ALT+F3 keyboard shortcat to highly all the word occurrence in text (more about this here) doesn't work and is erroring out on the console with this message.
Unknown macro command find_all_under
Troubleshooting
You can reproduce this by trying these steps:
- Create a new file with this content.
Line : aaa comment1 comment2 comment3 Line : bbb comment4 comment5
[ { "args": { "by": "characters", "extend": true, "forward": true }, "command": "move" }, { "args": null, "command": "find_all_under" } ]
When you try to execute this macro it doesn't work and you can see the error message in the console window.
Analysis and solution
The command find_all_under is documented and works fine. You can always try to run it manually from the console yourself.
view.window().run_command("find_all_under")
To create the automatic solution and let the editor to do the work for me I decided to write a Plugin using Sublime Python API. The code works perfectly fine and can be found on my github account: https://github.com/rtomaszewski/sublime under the file device_list.py. All what you need to do is to install this plugin and execute it manually or use a keyboard shortcat to trigger it.
Workaround example:
view.run_command("device_list")
References
Sublime Python API
http://www.sublimetext.com/docs/2/api_reference.html
http://docs.sublimetext.info/en/latest/reference/plugins.html
Commands
http://docs.sublimetext.info/en/latest/reference/commands.html
http://www.sublimetext.com/docs/commands
http://docs.sublimetext.info/en/latest/extensibility/commands.html
Debugging
http://www.sublimetext.com/forum/viewtopic.php?f=6&t=10106
http://sublimetext.userecho.com/topic/114638-ctrlshiftt-does-not-work/
http://www.sublimetext.com/forum/viewtopic.php?f=6&t=4961
No comments:
Post a Comment