Skip to content

Commit

Permalink
Merge pull request #80 from tshino/add-config-recordoptions
Browse files Browse the repository at this point in the history
Add recordOptions to config.js
  • Loading branch information
tshino authored Apr 5, 2022
2 parents 52ab583 + 6a309b8 commit 5ee4ccc
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 100 deletions.
49 changes: 33 additions & 16 deletions generator/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@
}
],
"exclusion": [
"editor.action.triggerSuggest",
"hideSuggestWidget",
"selectNextSuggestion",
"selectPrevSuggestion",
"selectNextPageSuggestion",
"selectPrevPageSuggestion",
"toggleExplainMode",
"toggleSuggestionDetails",
"toggleSuggestionFocus",
"acceptSelectedSuggestion",
"acceptAlternativeSelectedSuggestion",
"insertSnippet",
"leaveSnippet",
"editor.action.insertSnippet",
"jumpToNextSnippetPlaceholder",
"jumpToPrevSnippetPlaceholder",
"workbench.action.showCommands",
"showPrevParameterHint",
"showNextParameterHint"
Expand All @@ -39,6 +23,39 @@
[ "editor.action.clipboardCutAction", "document [!kb-macro.headOfLine]selection clipboard" ],
[ "editor.action.clipboardPasteAction", "document selection" ]
],
"recordOptions": [
[ "editor.action.inlineSuggest.showNext", "side-effect" ],
[ "editor.action.inlineSuggest.showPrevious", "side-effect" ],
[ "editor.action.inlineSuggest.commit", "side-effect" ],
[ "editor.action.inlineSuggest.hide", "side-effect" ],
[ "editor.action.inlineSuggest.trigger", "side-effect" ],

[ "editor.action.triggerSuggest", "side-effect" ],
[ "hideSuggestWidget", "side-effect" ],
[ "insertNextSuggestion", "side-effect" ],
[ "insertPrevSuggestion", "side-effect" ],
[ "selectFirstSuggestion", "side-effect" ],
[ "selectLastSuggestion", "side-effect" ],
[ "selectNextSuggestion", "side-effect" ],
[ "selectPrevSuggestion", "side-effect" ],
[ "selectNextPageSuggestion", "side-effect" ],
[ "selectPrevPageSuggestion", "side-effect" ],
[ "toggleExplainMode", "side-effect" ],
[ "toggleSuggestionDetails", "side-effect" ],
[ "toggleSuggestionFocus", "side-effect" ],
[ "acceptSelectedSuggestion", "side-effect" ],
[ "acceptSelectedSuggestionOnEnter", "side-effect" ],
[ "acceptAlternativeSelectedSuggestion", "side-effect" ],
[ "editor.action.resetSuggestSize", "side-effect" ],

[ "insertSnippet", "side-effect" ],
[ "acceptSnippet", "side-effect" ],
[ "leaveSnippet", "side-effect" ],
[ "editor.action.insertSnippet", "side-effect" ],
[ "editor.action.showSnippets", "side-effect" ],
[ "jumpToNextSnippetPlaceholder", "side-effect" ],
[ "jumpToPrevSnippetPlaceholder", "side-effect" ]
],
"header": [
{
"key": "enter",
Expand Down
10 changes: 5 additions & 5 deletions keymap-wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Click the keymap wrapper link in the table below, which opens a JSON file. Copy

| Keymap extension | Keymap wrapper | Last updated | Start recording | Stop recording | Playback |
| ---------------- | -------------- | ------------ | ---------- | --------- | -------- |
| [Atom Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.atom-keybindings) | [link](ms-vscode.atom-keybindings.json) | 2021-12-24 | `Ctrl+Alt+R` | `Ctrl+Alt+R` | `Ctrl+Alt+P` |
| [Awesome Emacs Keymap](https://marketplace.visualstudio.com/items?itemName=tuttieee.emacs-mcx) | [link](tuttieee.emacs-mcx.json) | 2022-04-04 | `C-x S-9` | `C-x S-0` | `C-x e` |
| [Delphi Keymap](https://marketplace.visualstudio.com/items?itemName=alefragnani.delphi-keybindings) | [link](alefragnani.delphi-keybindings.json) | 2022-04-04 | `Ctrl/Cmd+Shift+R` | `Ctrl/Cmd+Shift+R` | `Ctrl/Cmd+Shift+P` |
| [Atom Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.atom-keybindings) | [link](ms-vscode.atom-keybindings.json) | 2022-04-05 | `Ctrl+Alt+R` | `Ctrl+Alt+R` | `Ctrl+Alt+P` |
| [Awesome Emacs Keymap](https://marketplace.visualstudio.com/items?itemName=tuttieee.emacs-mcx) | [link](tuttieee.emacs-mcx.json) | 2022-04-05 | `C-x S-9` | `C-x S-0` | `C-x e` |
| [Delphi Keymap](https://marketplace.visualstudio.com/items?itemName=alefragnani.delphi-keybindings) | [link](alefragnani.delphi-keybindings.json) | 2022-04-05 | `Ctrl/Cmd+Shift+R` | `Ctrl/Cmd+Shift+R` | `Ctrl/Cmd+Shift+P` |
| [Notepad++ Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.notepadplusplus-keybindings) | [link](ms-vscode.notepadplusplus-keybindings.json) | 2021-12-26 | `Ctrl+Shift+R` | `Ctrl+Shift+R` | `Ctrl+Shift+P` |
| [Sublime Text Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.sublime-keybindings) | [link](ms-vscode.sublime-keybindings.json) | 2021-12-21 | `Ctrl/Cmd+Q` | `Ctrl/Cmd+Q` | `Ctrl/Cmd+Shift+Q` |
| [Visual Studio Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vs-keybindings) | [link](ms-vscode.vs-keybindings.json) | 2021-12-29 | `Ctrl+M R` | `Ctrl+M R` | `Ctrl+M Enter` |
| [Vz Keymap](https://marketplace.visualstudio.com/items?itemName=tshino.vz-like-keymap) | [link](tshino.vz-like-keymap.json) | 2022-01-27 | `Ctrl+_` | `Ctrl+^` | `Ctrl+^` |
| [Visual Studio Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vs-keybindings) | [link](ms-vscode.vs-keybindings.json) | 2022-04-05 | `Ctrl+M R` | `Ctrl+M R` | `Ctrl+M Enter` |
| [Vz Keymap](https://marketplace.visualstudio.com/items?itemName=tshino.vz-like-keymap) | [link](tshino.vz-like-keymap.json) | 2022-04-05 | `Ctrl+_` | `Ctrl+^` | `Ctrl+^` |

- Each keyboard shortcut for start/stop recording and playback is assigned to the same ones that the original editor is using, as much as possible.
- You can find the definitions of them at the bottom of each keymap wrapper file (find the `startRecording` command etc.). You can customize them as you like.
Expand Down
4 changes: 2 additions & 2 deletions keymap-wrapper/alefragnani.delphi-keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
"when": "kb-macro.recording && isMac && editorTextFocus" },
{ "key": "ctrl+alt+shift+home", "command": "kb-macro.wrap", "args": { "command": "cursorTopSelect" },
"when": "kb-macro.recording && !isMac && editorTextFocus" },
{ "key": "cmd+j", "command": "kb-macro.wrap", "args": { "command": "editor.action.showSnippets" },
{ "key": "cmd+j", "command": "kb-macro.wrap", "args": { "command": "editor.action.showSnippets", "record": "side-effect" },
"when": "kb-macro.recording && isMac && editorTextFocus" },
{ "key": "ctrl+j", "command": "kb-macro.wrap", "args": { "command": "editor.action.showSnippets" },
{ "key": "ctrl+j", "command": "kb-macro.wrap", "args": { "command": "editor.action.showSnippets", "record": "side-effect" },
"when": "kb-macro.recording && !isMac && editorTextFocus" },
{ "key": "cmd+right", "command": "kb-macro.wrap", "args": { "command": "cursorWordRight" },
"when": "kb-macro.recording && isMac && editorTextFocus" },
Expand Down
2 changes: 1 addition & 1 deletion keymap-wrapper/ms-vscode.atom-keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"when": "kb-macro.recording && isMac" },
{ "key": "ctrl+alt+i", "command": "kb-macro.wrap", "args": { "command": "workbench.action.toggleDevTools" },
"when": "kb-macro.recording && !isMac" },
{ "key": "alt+shift+s", "command": "kb-macro.wrap", "args": { "command": "editor.action.showSnippets" },
{ "key": "alt+shift+s", "command": "kb-macro.wrap", "args": { "command": "editor.action.showSnippets", "record": "side-effect" },
"when": "kb-macro.recording" },
{ "key": "ctrl+shift+o", "command": "kb-macro.wrap", "args": { "command": "workbench.action.files.openFolder" },
"when": "kb-macro.recording" },
Expand Down
4 changes: 2 additions & 2 deletions keymap-wrapper/ms-vscode.vs-keybindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"when": "kb-macro.recording && inDebugMode" },
{ "key": "ctrl+k ctrl+d", "command": "kb-macro.wrap", "args": { "command": "editor.action.formatDocument" },
"when": "kb-macro.recording" },
{ "key": "ctrl+k ctrl+x", "command": "insertSnippet",
{ "key": "ctrl+k ctrl+x", "command": "kb-macro.wrap", "args": { "command": "insertSnippet", "record": "side-effect" },
"when": "kb-macro.recording" },
{ "key": "ctrl+shift+l", "command": "kb-macro.wrap", "args": { "command": "editor.action.deleteLines" },
"when": "kb-macro.recording && editorTextFocus && !editorReadonly" },
Expand All @@ -33,7 +33,7 @@
"when": "kb-macro.recording && editorTextFocus" },
{ "key": "shift+alt+.", "command": "kb-macro.wrap", "args": { "command": "editor.action.addSelectionToNextFindMatch" },
"when": "kb-macro.recording && editorFocus" },
{ "key": "ctrl+alt+space", "command": "editor.action.triggerSuggest",
{ "key": "ctrl+alt+space", "command": "kb-macro.wrap", "args": { "command": "editor.action.triggerSuggest", "record": "side-effect" },
"when": "kb-macro.recording && editorHasCompletionItemProvider && editorTextFocus && !editorReadonly" },
{ "key": "alt+space", "command": "kb-macro.wrap", "args": { "command": "undo" },
"when": "kb-macro.recording" },
Expand Down
18 changes: 9 additions & 9 deletions keymap-wrapper/tshino.vz-like-keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,23 +419,23 @@
"when": "kb-macro.recording && listFocus && !inputFocus && config.vzKeymap.listViewKeys" },
{ "key": "ctrl+m", "command": "kb-macro.wrap", "args": { "command": "list.select" },
"when": "kb-macro.recording && listFocus && !inputFocus && config.vzKeymap.listViewKeys" },
{ "key": "ctrl+e", "command": "selectPrevSuggestion",
{ "key": "ctrl+e", "command": "kb-macro.wrap", "args": { "command": "selectPrevSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+x", "command": "selectNextSuggestion",
{ "key": "ctrl+x", "command": "kb-macro.wrap", "args": { "command": "selectNextSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+r", "command": "selectPrevPageSuggestion",
{ "key": "ctrl+r", "command": "kb-macro.wrap", "args": { "command": "selectPrevPageSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+c", "command": "selectNextPageSuggestion",
{ "key": "ctrl+c", "command": "kb-macro.wrap", "args": { "command": "selectNextPageSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+q ctrl+r", "command": "kb-macro.wrap", "args": { "command": "selectFirstSuggestion" },
{ "key": "ctrl+q ctrl+r", "command": "kb-macro.wrap", "args": { "command": "selectFirstSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+q r", "command": "kb-macro.wrap", "args": { "command": "selectFirstSuggestion" },
{ "key": "ctrl+q r", "command": "kb-macro.wrap", "args": { "command": "selectFirstSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+q ctrl+c", "command": "kb-macro.wrap", "args": { "command": "selectLastSuggestion" },
{ "key": "ctrl+q ctrl+c", "command": "kb-macro.wrap", "args": { "command": "selectLastSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+q c", "command": "kb-macro.wrap", "args": { "command": "selectLastSuggestion" },
{ "key": "ctrl+q c", "command": "kb-macro.wrap", "args": { "command": "selectLastSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+m", "command": "acceptSelectedSuggestion",
{ "key": "ctrl+m", "command": "kb-macro.wrap", "args": { "command": "acceptSelectedSuggestion", "record": "side-effect" },
"when": "kb-macro.recording && acceptSuggestionOnEnter && suggestWidgetVisible && suggestionMakesTextEdit && textInputFocus && config.vzKeymap.suggestionWidgetKeys" },
{ "key": "ctrl+x", "command": "kb-macro.wrap", "args": { "command": "settings.action.focusSettingsFromSearch" },
"when": "kb-macro.recording && inSettingsSearch && !suggestWidgetVisible && config.vzKeymap.settingsPageKeys" },
Expand Down
Loading

0 comments on commit 5ee4ccc

Please sign in to comment.