Question

I want to create a custom key binding to trigger the Tools > Snippets overlay. I know sublime uses the show_overlay command and overlay enum, but after trial an error I can't figure out what to set the enum to.

{ 
  "keys": ["shortcut"], 
  "command": "show_overlay", "args": {"overlay": "some_unknown_command"}
}

I'm not looking to insert a specific snippet, just trigger the overlay.

Was it helpful?

Solution

You can find the command by entering sublime.log_commands(True) in the ST console, then using the menu to display the overlay. It will give you the arguments and command you need to use.

{
    "keys": [ <your keys here> ],
    "command": "show_overlay",
    "args": {
        "overlay": "command_palette",
        "text": "Snippet:"
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top