On regular AIX vi (not vim, just plain old vi):
I tried to do the following map, but it fails on the "P" or "p" part with the message Cannot use the put command while inside a global command or macro
What I tried (several tries) : ( ^M = Ctrl-v Enter )
#several tries, each have the same result : on use, it aborts on the "p" or "P" part
# q is unmapped on regular vi, so I use it for my test
:map q /something^MY^M?anotherthing^Mp
:map q /something^MY^M?anotherthing^MP
:map q /something^MY?anotherthing^Mp
:map q /something^MY?anotherthing^MP
# then : while in normal mode, I type: q
Each time I use q
in normal mode: the first actions work fine (and I can also dd
instead of Y
), but it then aborts the execution of that mapping on the p
or P
part.
I tried to Google this error message but see no occurences (but Google search is definitely not what it used to be...)
I'd appreciate any pointer on what workaround I could use to be able to, in a :map
, paste something than that same mapping previously yanked/dd'ed.