How to create custom commands in VSCode?
A few marketplace extensions may be of interest:
- Script Commands by Marcel J. Kloubert
- multi-command by ryuta46
However in general, you'll need to write an extension to do anything complex.
There's also a VS Code issue tracking support for built-in macros
There's Power Tools by e.GO:digital. It has support for custom commands and event triggers (ie. on file changed), among other things.