Is it straightforwardly possible to define a command to be added into VS Code's command palette, which runs an existing command with specified arguments?
Concrete example: I have installed the Alignment extension, and want to use it to align Ruby symbol-key hashes like so:
{
key: 'foo',
anotherKey: 'bar',
myKey: 'ponk'
}
I can do this by invoking Align by regex
, then in the palette dialog that opens giving the regex (?<=:) \w
.
Naturally, that's a pain to type each time. Can I define a palette command to do that in one step?