Open ottopic opened 5 years ago
@geddski are you supporting this extension? According with vs code team the problem is that now clipboard is async.
vscode.commands.executeCommand which returns a promise but that extension isn't awaiting those promises, see https://github.com/geddski/macros/blob/master/extension.js#L34. Reading from the clipboard is now async and mostly like a command is started before the previous command is done.
Probably it can be fixed add 'await' param before vscode.commands.executeCommand. https://code.visualstudio.com/api/references/commands
@jeff-hykin has made a fork of this extension: macro-commander, and it's available in the marketplace. It appears to handle this problem and has been working for me in the current version of VSCode.
Yeah I had issues with async commands so I added an await to all of them. Although I don't have time at the moment to add more features, I do plan on actively maintaining the extension in terms of bugs and merging pull requests.
I'm using this extension from 8 months, but I think from last VS code version 1.37.1 my macro doesn't work anymore. ${CLIPBOARD} is not replaced anymore from selected text. In some case all snippet is pasted replacing all document text instead insert it after the newline.
Anyone can help me?
settings.json
`
`
snippets/php.json
`
`