diff --git a/generators/menu/index.js b/generators/menu/index.js index e4c1b2d..fc950e4 100644 --- a/generators/menu/index.js +++ b/generators/menu/index.js @@ -53,7 +53,7 @@ module.exports = class extends Generator { }; answers.menu_types.forEach(menu_type => { - data["menu_type"] = menu_type; + data['menu_type'] = menu_type; this.renderTemplate( this.templatePath(`${menu_type}.sublime-menu`), diff --git a/generators/menu/templates/Context.sublime-menu b/generators/menu/templates/Context.sublime-menu index 57966fe..da2f5f5 100644 --- a/generators/menu/templates/Context.sublime-menu +++ b/generators/menu/templates/Context.sublime-menu @@ -1,12 +1,13 @@ [ { // Right click on main buffer. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Encoding.sublime-menu b/generators/menu/templates/Encoding.sublime-menu index 6ad4db0..9384cb9 100644 --- a/generators/menu/templates/Encoding.sublime-menu +++ b/generators/menu/templates/Encoding.sublime-menu @@ -1,12 +1,13 @@ [ { // Left click on "Encoding" section in statusbar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Find in Files.sublime-menu b/generators/menu/templates/Find in Files.sublime-menu index 6173566..7ccc45e 100644 --- a/generators/menu/templates/Find in Files.sublime-menu +++ b/generators/menu/templates/Find in Files.sublime-menu @@ -1,12 +1,13 @@ [ { // Left click on "..." button on Where field of Find_in_files. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Indentation.sublime-menu b/generators/menu/templates/Indentation.sublime-menu index 0684463..c533b59 100644 --- a/generators/menu/templates/Indentation.sublime-menu +++ b/generators/menu/templates/Indentation.sublime-menu @@ -1,12 +1,13 @@ [ { // Left click on "Indentation" section in statusbar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Line Endings.sublime-menu b/generators/menu/templates/Line Endings.sublime-menu index 521554d..70031a6 100644 --- a/generators/menu/templates/Line Endings.sublime-menu +++ b/generators/menu/templates/Line Endings.sublime-menu @@ -1,12 +1,13 @@ [ { // Left click on "Line Ending" section in statusbar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Main.sublime-menu b/generators/menu/templates/Main.sublime-menu index 829aa06..4c16340 100644 --- a/generators/menu/templates/Main.sublime-menu +++ b/generators/menu/templates/Main.sublime-menu @@ -1,6 +1,13 @@ [ { - // Main Menu bar. + // Structure + // caption: Text to display + // id: + // mnemonic: Accelerator key (i.e press "k" will trigger this caption) + // command: Action to execute + // children: Sub-menu + // checkbox: true/falseMain Menu bar. + "caption": "Preferences", "mnemonic": "n", "id": "preferences", diff --git a/generators/menu/templates/Side Bar Mount Point.sublime-menu b/generators/menu/templates/Side Bar Mount Point.sublime-menu index d7eda53..02c1cd9 100644 --- a/generators/menu/templates/Side Bar Mount Point.sublime-menu +++ b/generators/menu/templates/Side Bar Mount Point.sublime-menu @@ -1,12 +1,13 @@ [ { // Right click on main folders in Sidebar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Side Bar.sublime-menu b/generators/menu/templates/Side Bar.sublime-menu index 2d5cf69..77138c6 100644 --- a/generators/menu/templates/Side Bar.sublime-menu +++ b/generators/menu/templates/Side Bar.sublime-menu @@ -1,12 +1,13 @@ [ { // Right click on items in Sidebar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Syntax.sublime-menu b/generators/menu/templates/Syntax.sublime-menu index 2d5cf69..77138c6 100644 --- a/generators/menu/templates/Syntax.sublime-menu +++ b/generators/menu/templates/Syntax.sublime-menu @@ -1,12 +1,13 @@ [ { // Right click on items in Sidebar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Tab Context.sublime-menu b/generators/menu/templates/Tab Context.sublime-menu index d175900..db0e1cb 100644 --- a/generators/menu/templates/Tab Context.sublime-menu +++ b/generators/menu/templates/Tab Context.sublime-menu @@ -1,12 +1,13 @@ [ { // Right click on Tab bar. - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/menu/templates/Widget Context.sublime-menu b/generators/menu/templates/Widget Context.sublime-menu index 53f455a..59d4488 100644 --- a/generators/menu/templates/Widget Context.sublime-menu +++ b/generators/menu/templates/Widget Context.sublime-menu @@ -1,12 +1,13 @@ [ { // Right click on text field of any widget (i.e: search panel or output panel). - "caption": "<%= package_name %> - <%= menu_type %>", - "id": "<%= package_name %>", - "mnemonic": "N", - "command": "new_file", - // "children": [ + "caption": "<%= package_name %> - <%= menu_type %>", // Text to display + "id": "<%= package_name %>", // ID + "mnemonic": "N", // Accelerator key (i.e press "k" will trigger this caption) + "command": "new_file", // Action to execute + // "checkbox": true/false // Checkbox + // "children": [ // Sub-menu // { // "command": "new_file", // "caption": "New File", diff --git a/generators/snippet/templates/snippet.sublime-snippet b/generators/snippet/templates/snippet.sublime-snippet index af52891..c0baf3b 100644 --- a/generators/snippet/templates/snippet.sublime-snippet +++ b/generators/snippet/templates/snippet.sublime-snippet @@ -1,8 +1,8 @@ -]]> - <%= snippet_tab_trigger %> - <%= snippet_description %> - <%= snippet_scope %> +]]> + <%= snippet_tab_trigger %> + <%= snippet_description %> + <%= snippet_scope %>