Sublime Forum

Entries in Main.sublime.menu don't show up---newbie help?

#1

Hi everyone,

I’m writing my first ST3 plugin (on build 3083, using OSX el capitan), and I’ve gotten the actual functionality working, plus keybinding working.

However, I can’t get a menu entry to show up, nor can I get anything in the command palette—and as far as I can tell, these are both totally undocumented. (Also, tutorials online seem to give inconsistent information.)

So the plugin is just to get rid of horrendous non-ascii punctuation from pasted-in content (e.g. from MS products, webpages), it’s one little command.

here’s my Main.sublime.menu file in its entirety:

[
{
“id” : “edit”,
“command”: “ascii”,
“caption”: “Punctuation to ASCII”
}
]

What I think should happen: that should add a menu entry to the bottom of the edit menu that says “Punctuation to ASCII” (and maybe/hopefully also a command palette entry), which, when selected, invokes the run method of my AsciiCommand class.

What actually happens: no menu item appears, no command palette entry appears.

Help? I have tried restarting ST3, also have tried saving and resaving every file in the package… nada. I’ve also tried formatting the file a bunch of different ways, but nothing sees to make any changes to the menu at all…

thanks!

0 Likes

#2

I’ve also tried this format, which also doesn’t do anything:

[
{
“id” : “edit”,
children: [{“command”: “ascii”, “caption”: “Punctuation to ASCII”}]
}
]

0 Likes

#3

Never mind. It was a stupid file naming error. If there’s a moderator, this thread could probably be deleted.

0 Likes