Closed jmlucjav closed 9 years ago
Peekaboo needs full control over the command-line to start itself (:call peekaboo#peak(...)
). So on <CTRL-R>
it should,
g:peekaboo_delay
. I'll look into in when I get some time.This can be done with gelguy/Cmd2.vim with the following mappings.
function! s:Peekaboo()
call peekaboo#peek(1, 'ctrl-r', 0)
endfunction
let g:Cmd2_cmd_mappings = {
\ 'Peekaboo': {'command': function('s:Peekaboo'), 'type': 'function'},
\ }
cmap <C-R> <Plug>(Cmd2)Peekaboo
Yeah, what @gelguy suggested could be a better way to handle this. I've tried implementing the aforementioned scheme, but realized that it has to rely on fragile hacks with extensive use of feedkeys()
. I'll mark this issue as wontfix
and close it. Thanks.
@gelguy tested this and works like a charm. Thanks both. @junegunn maybe it's worth mentioning this on the readme so this great usage does not go unnoticed?
@jmlucjav Okay, I'll update the FAQ section.
I guess there is some reason why it's not already mapped to cmode or you would have already done so. But just double checking.
I naively tried:
cnoremap call peekaboo#peek(1, 'ctrl-r', 0)
and the sidebar shows up, but not sure how to go on. Needless to say, my knowledge of viml is limited to let this and let that...