vim-barbaric icon indicating copy to clipboard operation
vim-barbaric copied to clipboard

Slow down the speed of macros

Open ghost opened this issue 5 years ago • 2 comments

IME will also change when a running macro entering/leaving insert mode.

ghost avatar Oct 15 '20 04:10 ghost

This is an interesting problem. Here are the solutions, as I see them:

  1. The easiest fix would be if there were a way to run system() commands asynchronously. Your system would still be asked to switch the IME every time your macro entered/exited insert mode, but at least it wouldn't slow down the macro.

    Unfortunately, I don't know of a platform-agnostic way to do this. It looks like :!start works on Windows, but I haven't found anything for Linux/Mac.

  2. Another approach would be to detect when vim is executing a macro, and then suppress barbaric's system() function call during those times.

    However, AFAICT, there is no way to do this.

  3. The only other fix I can think of is to remap @ to disable barbaric before running a macro, then re-enable it when the macro is finished.

Let me know if you come up with anything else.

rlue avatar Oct 15 '20 11:10 rlue