Apply macro to all the search results
Hi
I want to write a plugin that will allow me to apply some macro to every matched position in every file from search results
I've created an action. I can choose a macro to apply. I have search results in the form of Usage collection.
But struggling with applying the macro now
There is `usage.selectInEditor()` method
And I can call `macroManager.playMacro(targetMacro)`
But then they race. It seems this calls does not wait for the results, but just schedule actions to run some time in the future.
How can I wait for editor got focus and positioned properly? How can I wait for macro done?
Or maybe there is more convenient way to acheave this goal?
请先登录再写评论。
Nevermind
Made it work another way