How to clear vim registers effectively?
Since that venerable answer on the mailing list, linked by @romainl, we have setreg(‘a’, []) that clears the register. Thus, the code could become: let regs=split(‘abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-“‘, ‘\zs’) for r in regs call setreg(r, []) endfor