Registers in vim are a great feature to store text snippets and even to run commands on the text stored within them. However, I\'m a tidy person and tend to clean things up when
Since that venerable answer on the mailing list, linked by @romainl, we have setreg('a', []) that clears the register.
setreg('a', [])
Thus, the code could become:
let regs=split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/-"', '\zs') for r in regs call setreg(r, []) endfor