macrosneovim

How to add delay to macros ofr Neovim?


I want to use macros that jumping across files with telescope, so, macros may look like that one:

ve gsUKTran^M

That

so that macros allows me to jump to required file by the key over cursor

but that macros doesn't work, because I need to add delays as telescope is fast, but macros is faster, I need smth like small timeout after UKTran

If I know is that possible, I think, I can modify macros row and save to register.


Solution

  • I have not found how to make a timeout, but instead I have utilized vim marks for that. I have added big letter marks (mA, mB) in files I need to jump and instead of using telescope, created a macros with marks, the final result for my case

    mZve"ay'A/<Ctrl-R>ave"ryf"vi""ty'BGo<Enter>"rpo* <Esc>"tpo* <Esc>

    Explanation:

    PS. I have used here <Ctrl-R>, <Enter>, <Esc>, which are special characters, you can't copy them into register and replay