I'd like to append some words to a register in Vim. But instead of the words being appended together with no separator, I'd like to add " - " between the words.
I am recording a macro to find the words and append them to a specific register, which is easy to do but I do not know how to tell vim how to append the text separator after each word when I yank the word to the register.
Does anyone have any idea?
qa - start recording macro a
"zyiw - yank a word to register z
For the next step, how do I append " - " to register z before finding and appending the next word?
Thanks.