geddski / macros

macros support for VS Code
MIT License
166 stars 36 forks source link

Not all commands are executed. #29

Open VladislavKostin opened 6 years ago

VladislavKostin commented 6 years ago

Not sure what's going on. Trying this:

        "save": [
            "editor.action.formatDocument",
            "workbench.action.files.saveAll"
        ],
        "acceptAndFormat": [
            "^acceptSelectedSuggestion",
            "editor.action.formatDocument"
        ]

In the "save" macro the currently edited document doesn't seem to be saved but other documents are saved.

 {
    {
        "key": "ctrl+s",
        "command": "macros.save",
        "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
    },

In the next example, only one line of macro works in each case and it's a different line for each:

 {
        "key": "+",
        "command": "macros.acceptAndFormat",
        "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey && editorHasDocumentFormattingProvider && editorLangId == 'csharp'"
    },
    {
        "key": "-",
        "command": "macros.acceptAndFormat",
        "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey && editorHasDocumentFormattingProvider && editorLangId == 'csharp'"
    },