macros icon indicating copy to clipboard operation
macros copied to clipboard

is it possible for macros to take arguments?

Open lopugit opened this issue 8 years ago • 1 comments

If I'm calling a macro as a command from elsewhere, can I give it an args list?

lopugit avatar Dec 19 '17 13:12 lopugit

Taken from https://marketplace.visualstudio.com/items?itemName=geddski.macros#overview

Passing Arguments to Commands Many commands accept arguments, like the "type" command which lets you insert text into the editor. For these cases use an object instead of a string when specifying the command to call in your settings.json:

"macros": { "addSemicolon": [ "cursorEnd", {"command": "type", "args": {"text": ";"}} ] }

I can't get it to work with editor.action.indentUsingSpaces though...

ghost avatar Jul 24 '18 19:07 ghost