Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dennykorsukewitz committed Nov 24, 2023
1 parent 53c3a06 commit b1b1b01
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 56 deletions.
2 changes: 1 addition & 1 deletion generators/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Context.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Encoding.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Find in Files.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Indentation.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Line Endings.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 8 additions & 1 deletion generators/menu/templates/Main.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Side Bar Mount Point.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Side Bar.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Syntax.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Tab Context.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
11 changes: 6 additions & 5 deletions generators/menu/templates/Widget Context.sublime-menu
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions generators/snippet/templates/snippet.sublime-snippet
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<snippet>
<content><![CDATA[
<%= snippet_content %>
]]></content>
<tabTrigger><%= snippet_tab_trigger %></tabTrigger>
<description><%= snippet_description %></description>
<scope><%= snippet_scope %></scope>
]]></content> <!-- Template of text to be inserted. -->
<tabTrigger><%= snippet_tab_trigger %></tabTrigger> <!-- Optional: Press this sequence of keys then Tab to insert snippet. -->
<description><%= snippet_description %></description> <!-- Optional: Description to display in Snippets menu. -->
<scope><%= snippet_scope %></scope> <!-- Optional: limit the use of snippet to certain scope [[Scope.txt]]. -->
</snippet>

0 comments on commit b1b1b01

Please sign in to comment.