So, I was trying to write a Vim macro and the macro @p
I registered below includes a cc
shortcuts which deletes a line. The macro is as follows.
" macro @p
qp
cc{<ESC>j@eA,<ESC>j@ejcc},<ESC>
q
When I run the macro @p
itself, it works just fine.
" macro @q
qq
@pj
q
However, when I registered another macro @q
that uses macro @p
, and try to repeat macro @q
until the end of file by using :999@q
, it says
E42: No errors: cc
and I have no idea why this isn't working.
I realize this has to do with Quick fix command, and found that there is :cc
command in quickfix.txt
. I doubt that my problem derives from here.(Because the shortcut for deleting line in Vim is the same as the shortcut for quick fix as cc
.
Is Quick fix the reason why I get the E42: No errors: cc
?
How can I fix the problem? Just so you know, I am using MAC OS and neovim.