Re:Intermediate Vim
by tomsmeding on Wednesday May 01, 2019 @07:32AM
(#19796145)
Another notable trick is that vim registers are case-insensitive -- and since macro's are just stored in registers, macro's are case-insenstitive as well. so @q == @Q, which alleviates some of the RSI problems with spamming @q.
[ Parent
| on HN ]
I remember something about a capital register appending instead of overwriting -- is that only for saving (with no influence in execution)?
Yes, that's only for writing. For example, to collect all lines matching a pattern into a register with
:g/pattern/y A
you need to use an uppercase register ("A" in this case) because it executes `y` once per match. With `y a` instead of `y A`, you would end up having only the last match in the register.