Sublime Forum

Add support for plugins to be able to append to menus

#1

Jon,

It would be GREAT for plugins to be able to add items to existing menus without having to redefine them. The package menus are nice, but are clumsy to get to. Namely, think appending to context menus would be the MOST useful.

Thanks,
Greg

0 Likes

#2

I agree, it’d be handy to be able to append to menus, especially context menus.

The main reason why I haven’t done it yet is that I’m not a fan of the complexity: menu files would have to be merged together, which means there’d need to be some way of specifying the ordering of various items, and it should ideally need to work properly in the presence of sub-menus, and it’d ideally need to be robust vs. a rearranging of the menus, as happens from time to time.

0 Likes

#3

Yeah, I understand that the merging would have to be done. What I would expect is that the app creates all of its menus, and then the external package menus would then just be appended to the bottom of the default menus. The order of what gets added would be dependent on the order the external packages get loaded/scanned, but that’s a minor headache. We already have to deal with binding conflicts now, and that’s a much bigger deal than the order of menu items. Although, I am not asking that the bindings be architected at all. I am fine with the way things work now.

0 Likes