Recently it came up to me, that I miss some behavior from the "goto everywhere". I wanted to enhance the current "goto" (ctrl+r) a little bit, by appending selection text to "@" (e.g. if "myFunction" text is highlighted, the "Goto everywhere" popup would start with "@myFunction" rather than "@"). The problem is that I can run some commands from within plugin, but `.run_command("show_overlay", ...)` does nothing.
The plugin as of now is extremely simple, just 4 lines:
- Code: Select all
import sublime, sublime_plugin
class GotoSelectionCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().run_command("show_overlay", {"overlay": "goto", "text": "@replace_with_first_selection"})
Do I miss something, maybe?