I haven't tried this feature on VS Code, but isn't the record and replay macros feature in Emacs(normally bound to F3 and F4) a simpler(and more general, since seemingly it can record arbitrary text transformations) approach to achieve a similar effect?