How to add configuration to Sublime Text 2 menu?

I wrote a plugin for Sublime Text 2 that talks about the binary I wrote. I put the flags in a binary file as a settings file , but I cannot figure out how to get the settings file placed in the menu bar.

Where I want the settings

Here is my best attempt.

Here are the settings documents (not sure where those on the menu are).

+5
source share
1 answer

, , , id, . , Preferences:

{
    "caption": "Preferences",
    "mnemonic": "n",
    "id": "preferences",
    "children": [ ... ]
},

, Settings – More Packages/Default/Main.sublime-menu id.

{
   "caption": "Settings – More",
   "children": [ ... ]
},

, id Settings – More Main.sublime-menu id id Main.sublime-menu, , Preferences 'id . Settings – More.

id Settings – More, , Sublime Text 2 , . , in Settings – More (-); , , .

Preferences Preferences -> Package Settings, Main.sublime-menu :

[
  {
    "caption": "Preferences",
    "mnemonic": "n", // The mnemonics are for quick keyboard access
    "id": "preferences",
    "children": [
      {
        "caption": "Package Settings",
        "mnemonic": "P", // On windows, Alt+N (above) followed by Alt+P would open this menu
        "id": "package-settings",
        "children": [
          { 
            "caption": "Seeing Is Believing",
            "children": [
              {
                "command": "open_file",
                "args": {"file": "${packages}/Seeing Is Believing/Seeing Is Believing.sublime-settings"},
                "caption": "Settings – Default"
              }
            ]
          }
        ]
      }
    ]
  }
]

Main.sublime-menu, , , . Sublime Text 2 Main.sublime-menu, AdvancedNewFile.

+1
source

All Articles