Create Code Action that executes sequence of commands, customizable via configuration.
Unlike the general, ubiquitous commands, Code Action is a different kind of function that are more contextual to the specific content and language of the document.
While you can't execute a Code Action from the Command Palette, one unique feature that's only available through Code Action is Code Actions on Save. You can use it to execute a Code Action whenever a document is saved.
With this extension, you can create Code Action that executes sequence of commands. Then you can use it in the editor.codeActionsOnSave
setting.
One way to know the ID of a command through the Command Palette is to click the gear icon to the right, then check the input box in the "Keyboard Shortcuts" page.
If you use a command that changes the file content (e.g. editor.action.indentationToSpaces
) on save, it empties the redo history the same way as you manually invoked it, or like just typed anything.
Extension icon: Action figure icons created by Freepik - Flaticon