Skip to content

Commit

Permalink
Bump up version to v1.3.0
Browse files Browse the repository at this point in the history
* Introduced a configuration to individually show/hide its commands from the context menu
  • Loading branch information
ryu1kn committed Jul 28, 2018
1 parent 393d39c commit c7e59cb
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to "Partial Diff" extension will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.3.0] - 2018-07-28
### Added
- A configuration for individually show/hide Partial Diff commands on the context menu. [#27](https://github.com/ryu1kn/vscode-partial-diff/issues/27)

### Deprecated
- `partialDiff.hideCommandsOnContextMenu` setting, as the new configuration can cover its use case.

## [1.2.0] - 2018-06-27
### Added
- A configuration to hide Partial Diff commands from the context menu. [#26](https://github.com/ryu1kn/vscode-partial-diff/issues/26)
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,18 @@

## Configurations

* `partialDiff.hideCommandsOnContextMenu` (default: `false`)
* `partialDiff.commandsOnContextMenu` (default: `{"markSection1": true, ...}`, all commands visible)

Commands appear on the context menu. Unlisted commands will still appear.

For example, if you don't want to see *Compare Text in Visible Editors* command (Command ID: `extension.partialDiff.diffVisibleEditors`)
on the context menu, you can set this setting as follows:

Hide Partial Diff commands on the context menu.
```
"partialDiff.commandsOnContextMenu": {
"diffVisibleEditors": false
}
```
* `partialDiff.preComparisonTextNormalizationRules` (default: `[]`)
Expand Down Expand Up @@ -86,6 +95,10 @@
]
```
* `partialDiff.hideCommandsOnContextMenu` (default: `false`)
(DEPRECATED) Hide Partial Diff commands on the context menu. Please use `partialDiff.commandsOnContextMenu` instead.
## Keyboard Shortcuts
You can quickly mark the selected text by adding the `partial-diff` commands to your keyboard shortcut settings. For example:
Expand Down
43 changes: 36 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "partial-diff",
"displayName": "Partial Diff",
"description": "Compare (diff) text selections within a file, across files, or to the clipboard",
"version": "1.2.0",
"version": "1.3.0",
"publisher": "ryu1kn",
"license": "SEE LICENSE IN LICENSE.txt",
"icon": "images/partial-diff_128x128.png",
Expand Down Expand Up @@ -38,10 +38,39 @@
"title": "Partial Diff configurations",
"properties": {
"partialDiff.hideCommandsOnContextMenu": {
"description": "Hide Partial Diff commands on the context menu",
"description": "(DEPRECATED) Hide Partial Diff commands on the context menu. Use `partialDiff.commandsOnContextMenu` instead",
"type": "boolean",
"default": false
},
"partialDiff.commandsOnContextMenu": {
"description": "Commands appear on the context menu. Unlisted commands will appear on the menu",
"type": "object",
"properties": {
"markSection1": {
"type": "boolean"
},
"markSection2AndTakeDiff": {
"type": "boolean"
},
"diffSelectionWithClipboard": {
"type": "boolean"
},
"diffVisibleEditors": {
"type": "boolean"
},
"togglePreComparisonTextNormalizationRules": {
"type": "boolean"
}
},
"default": {
"markSection1": true,
"markSection2AndTakeDiff": true,
"diffSelectionWithClipboard": true,
"diffVisibleEditors": true,
"togglePreComparisonTextNormalizationRules": true
},
"additionalProperties": false
},
"partialDiff.preComparisonTextNormalizationRules": {
"description": "Rules to normalize texts before taking a diff",
"type": "array",
Expand Down Expand Up @@ -121,27 +150,27 @@
{
"command": "extension.partialDiff.markSection1",
"group": "2_partialdiff@1",
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.markSection1"
},
{
"command": "extension.partialDiff.markSection2AndTakeDiff",
"group": "2_partialdiff@2",
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.markSection2AndTakeDiff"
},
{
"command": "extension.partialDiff.diffSelectionWithClipboard",
"group": "2_partialdiff@3",
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.diffSelectionWithClipboard"
},
{
"command": "extension.partialDiff.diffVisibleEditors",
"group": "2_partialdiff@4",
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.diffVisibleEditors"
},
{
"command": "extension.partialDiff.togglePreComparisonTextNormalizationRules",
"group": "2_partialdiff@5",
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu"
"when": "editorTextFocus && !config.partialDiff.hideCommandsOnContextMenu && config.partialDiff.commandsOnContextMenu.togglePreComparisonTextNormalizationRules"
}
]
}
Expand Down

0 comments on commit c7e59cb

Please sign in to comment.