Skip to content

Commit

Permalink
ref #21 Added a config to show/hide menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
ryu1kn committed Aug 9, 2018
1 parent 59dd7c3 commit c8fcadd
Showing 1 changed file with 63 additions and 4 deletions.
67 changes: 63 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,35 @@
],
"default": 300
},
"textmarker.commandsOnContextMenu": {
"description": "Commands appear on the context menu",
"type": "object",
"properties": {
"highlightUsingRegex": {"type": "boolean"},
"toggleHighlight": {"type": "boolean"},
"unhighlight": {"type": "boolean"},
"toggleCaseSensitivity": {"type": "boolean"},
"toggleWholeMatch": {"type": "boolean"},
"clearAllHighlight": {"type": "boolean"},
"saveAllHighlights": {"type": "boolean"},
"updateHighlight": {"type": "boolean"},
"goToNextHighlight": {"type": "boolean"},
"goToPreviousHighlight": {"type": "boolean"}
},
"default": {
"highlightUsingRegex": false,
"toggleHighlight": true,
"unhighlight": false,
"toggleCaseSensitivity": false,
"toggleWholeMatch": false,
"clearAllHighlight": false,
"saveAllHighlights": false,
"updateHighlight": true,
"goToNextHighlight": true,
"goToPreviousHighlight": true
},
"additionalProperties": false
},
"textmarker.savedHighlights": {
"description": "Highlights that get applied when opening editor",
"type": "array",
Expand Down Expand Up @@ -199,22 +228,52 @@
{
"command": "textmarker.toggleHighlight",
"group": "2_textmarker@1",
"when": "editorTextFocus"
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.toggleHighlight"
},
{
"command": "textmarker.updateHighlight",
"group": "2_textmarker@2",
"when": "editorTextFocus"
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.updateHighlight"
},
{
"command": "textmarker.goToNextHighlight",
"group": "2_textmarker@3",
"when": "editorTextFocus"
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.goToNextHighlight"
},
{
"command": "textmarker.goToPreviousHighlight",
"group": "2_textmarker@4",
"when": "editorTextFocus"
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.goToPreviousHighlight"
},
{
"command": "textmarker.highlightUsingRegex",
"group": "2_textmarker@5",
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.highlightUsingRegex"
},
{
"command": "textmarker.unhighlight",
"group": "2_textmarker@6",
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.unhighlight"
},
{
"command": "textmarker.toggleCaseSensitivity",
"group": "2_textmarker@7",
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.toggleCaseSensitivity"
},
{
"command": "textmarker.toggleWholeMatch",
"group": "2_textmarker@8",
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.toggleWholeMatch"
},
{
"command": "textmarker.clearAllHighlight",
"group": "2_textmarker@9",
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.clearAllHighlight"
},
{
"command": "textmarker.saveAllHighlights",
"group": "2_textmarker@10",
"when": "editorTextFocus && config.textmarker.commandsOnContextMenu.saveAllHighlights"
}
]
}
Expand Down

0 comments on commit c8fcadd

Please sign in to comment.