In the ex linage of editors, one can append to a register(vim)/buffer(ex,vi) by specifying the register name in uppercase. As an example
will append every line match
pat to register
a. But if
a already has content, it will need to be cleared first.
In vim, one can do
let @a = ''. But this depends on having a vim compiled with the expression evaluation feature
+eval. One can also do
qaq, to record nothing into
a, but recording is disabled while executing a register, inside mappings or in
:normal, so it does not lend itself to automating.
vi/ex has no
let, and no
q or 'recording' equivalent , so how is buffers(registers) cleared in practical use?
To my disappointment,
:0y a put line 1 in
a, so the only way I can gleam is doing
"ay$ on an empty line. (EDIT: Apparently there is a discrepancy in how y$ works on empty lines between vim and vi)