I'm trying to define a macro which quickly generates a list of random-ish words.
I want the macro to turn this into a list like
a b c d e
arezzo bywords czars détente eyrie
What I have so far:
- put cursor on letter
- start recording macro
aenter insert mode
<C-x><C-k> - perform dictionary completion on the character before cursor - in this case the lettera`
<C-p>select the last item in the completion list that appears, on my system its the word
arezzo. (N.B. I have
longestincluded in my
'completeopt'setting, which is required for
<C-p>to work in this way during completion:
<C-y>accept the completion
^[^[exit insert mode
jmove down to the next line, ready to do the same operation on the next line
when I create the macro and go through the steps manually, everything works fine, however when I execute the macro, I see a message flashing in the command line something like:
scanning dictionary file
and nothing happens, of the commands in the macro only
j is run, i.e. the cursor moves down the line, but none of the completion commands run.
Is it possible to use insert mode completions in a macro, and if so, how can I do it?