Sublime Forum

Sublime-menu documentation?

#1

is the sublime-menu format documented anywhere? i assume so but i sure can’t find it.

more specific question:

how might i add a menu item using my Main.sublime-menu file, and have it be greyed out based on whether or not the current file is of a compatible syntax?

For example, Ive added a menu item for CSS Comb like so:

                { "caption": "CSS Comb", "command": "css_sorter" }

but it’s enabled even when the current syntax is PHP.

how do i change that?

0 Likes

#2

I don’t know if it’s documented anywhere, but you can create an “is_enabled” method within your command. Returning True or False for if you want it enabled or disabled.

0 Likes