Sublime Forum

.sublime-menu: different commands for Win and OSX

#1

Is it possible to have a .sublime-menu with different commands depending on OS (or just two different .sublime_menu’s)? In my menu I’d like to open files: but paths are different for Win and OSX. I imagine I probably can have a sublime_plugin that’ll return different paths depending on OS but I have no idea where to start.
Thanks! Sergey

0 Likes

#2

See this example:

2 Likes

#3

Oh, that was easy! Thank you very much.

0 Likes

#4

Thef following works as well and maybe a bit shorter.

{
    "command": "open_file",
    "args": {
        "file": "${packages}/Prefixr/Default ($platform).sublime-keymap",
    },
    "caption": "Key Bindings – Default"
},
3 Likes