junegunn / vim-peekaboo

:eyes: " / @ / CTRL-R
1.13k stars 39 forks source link

<C-r> broken in macros #15

Closed brettanomyces closed 9 years ago

brettanomyces commented 9 years ago

e.g.

hello world

qqVyo<c-r>"<esc>k

hello world
hello world
<blank line>

@q

Expected:

hello world
hello world
hello world
<blank line>
<blank line>

Actual

hello world
hello world
<blank line>
<blank line>
<blank line>
junegunn commented 9 years ago
  1. Are you running the latest version of peekaboo?
  2. qqVyo<c-r>"<esc>k should be qqVyo<c-r>"<esc>kq, right?
  3. The current version of peekaboo temporarily disables its mappings on @. However, if you invoke @ through nnoremap (e.g. nnoremap Q @q), peekaboo doesn't get a chance to do it. Changing it to nmap Q @q will fix the issue. I was thinking of mentioning this workaround in README page.
brettanomyces commented 9 years ago
  1. I was not. Updating to the latest version fixed the issue. I should have done that first.
  2. You are correct.
  3. I didn't have this mapping but I think I'll add it now, don't think I've ever used Ex mode anyway.