Sublime Forum

Disable menu items? Make the window go to the front?

#1

Is it possible to give menu items an execution context similar to how key bindings work? In other words, if the context operation fails, the menu item would be disabled.

Is it possible to make the sublime text window pop to the front via a plugin if another app has stolen the focus and come in front of it? I’m working on a GDB plugin and I’m thinking about the situation where the app being debugged creates its own window and then a breakpoint is hit and so I’d like the sublime text window to pop in front of the app being debugged.

0 Likes

#2

You can selectively enable menu items via implementing is_enabled() in your command

There’s no support for bringing a window to the front yet

0 Likes

#3

Great, is_enabled works just fine, thanks :smile:

0 Likes