Sublime Forum

Activate a keybind only in a Find Results tab

#1

I’d like Escape to cancel find in file operation, but only when the Find Results tab is opened

I’ve found the API that can detect whether the active sheet is a Find Results tab https://www.sublimetext.com/docs/api_reference.html#sublime.View.element, but I don’t understand how to make this a condition for a keybind, only found conditions for the find in files panel

So what’s the keybinding condition equivalent to this plugin API?

0 Likes

#2

If there is some view-level boolean setting that is only set in Find Results then you could use a keybinding context like {"key": "setting.foo"}.

In fact, even if there isn’t, you could make one exist by adding it to the Syntax Specific Settings file for Find Results.

{
  "foo": true
}
1 Like

#3

Great idea, thanks!

0 Likes