Sublime Forum

List separator?


Is there a list separator in ST? In the screenshot you can see I’m just using dashes but perhaps there is an actual separator which doesn’t allow you to select it (these are common for all menus in all OS’s)




In sublime-menu files you can have separators pretty easily by doing:

{ "caption": "-"},

But that’s because we’re talking about menus here (either main menus or context menus). In that screenshot we’re talking about a quick panel… not a menu, and If I’m not mistaken a quick panel is some sort of widget composed by a TextEdit + ListWidget living in a vertical layout. In ListWidgets there isn’t the concept of “Separator”, which is non selectable MenuItem… AFAIK :confused:



Well then that should probably be a feature request since is standard menu UI and quick panels are basically menus.



Mmm, not sure about that… I’d say quick panels are “filter dialogs” rather than menus, so the concept of separator doesn’t apply here (IMHO). One trick I use here though to make easier navigation through quick panels for my commands is grouping a bunch of commands like this (using your shot as example):

{ "caption": "BOOKMARK: GLPT FUNCTIONS: Cocoa_delay"},
{ "caption": "BOOKMARK: GLPT FUNCTIONS: Cocoa_GetTime"},
{ "caption": "BOOKMARK: GLPT FUNCTIONS: Cocoa_Terminate"},
{ "caption": "BOOKMARK: GLPT FUNCTIONS: Cocoa_GetBasePath"},

Why? By grouping all those subcommands by a common prefix I can easily find the subcommands typing the prefix (in this case BOOKMARK: GLPT FUNCTIONS)

In any case, if you feel that could be a nice feature request, be my guest :wink: . Just for the record… you know there is also context menus in Sublime where you can have separators, right?



Yes but I need this for the go to symbol command so contextual menus don’t apply. The reason I wanted this is merely so it’s easier to separate groups of functions when I’m growing the panel (same reason we ever use separators in menus really) but using lots of dashes works just fine. I just wanted to make sure the feature didn’t exist but I started using hacks.



There is no such thing like a separator for goto anything. Your method with using hyphens seems like a good workaround to me.