Open amandatennent opened 6 years ago
This is caused by delay in the editor, to verify it you can add a bunch of write commands (and you'll see that they eventually write in the find window)
Just in case anyone else lands here, the solution I landed on was:
"macros": {
"upgradeFMODEvent": [
{"command": "editor.actions.findWithArgs", "args": {"searchString": "[FMODUnity.EventRef]"} },
"editor.action.nextMatchFindAction",
]
}
Just in case anyone else lands here, the solution I landed on was:
"macros": { "upgradeFMODEvent": [ {"command": "editor.actions.findWithArgs", "args": {"searchString": "[FMODUnity.EventRef]"} }, "editor.action.nextMatchFindAction", ] }
That helps a lot. Thank you. And I give another example for anyone who lands here.
"json2-": [
{
"command": "editor.actions.findWithArgs",
"args": {
"searchString": "^ *('|\")(.+?)('|\") *: *('|\")(.+?)('|\"),? *$",
"replaceString": "-$2=$5",
"isRegex": true
}
},
"editor.action.replaceAll"
]
To know the full args of editor.actions.findWithArgs
, refer this
I'm trying to create a macro that will find a certain string (a regex string that I use a lot), that will then replace it with another regex string. I have set it up, but instead of the find string being placed in the find box, it's being placed in the text editor. Is there another argument I should be using instead of text?