Peekaboo extends "
and @
in normal mode and <CTRL-R>
in insert mode so
you can see the contents of the registers.
Using vim-plug:
Plug 'junegunn/vim-peekaboo'
Peekaboo will show you the contents of the registers on the sidebar when you
hit "
or @
in normal mode or <CTRL-R>
in insert mode. The sidebar is
automatically closed on subsequent key strokes.
You can toggle fullscreen mode by pressing spacebar.
" Default peekaboo window
let g:peekaboo_window = 'vertical botright 30new'
" Delay opening of peekaboo window (in ms. default: 0)
let g:peekaboo_delay = 750
" Compact display; do not display the names of the register groups
let g:peekaboo_compact = 1
" Prefix for the peekaboo key mapping (default: '')
let g:peekaboo_prefix = '<leader>'
" Prefix for CTRL-R insert key mapping (default: '')
let g:peekaboo_ins_prefix = '<c-x>'
Use non-recursive maps and abbreviations (e.g. nnoremap
, inoreabbrev
) so
that they are not expanded. It is strongly advised that you always stick to
nore
-versions unless you know exactly what you're doing.
There's no native support for command-line mode, but it's possible with another plugin. See here.
Peekaboo internally uses feedkeys()
function which can break macros. So
Peekaboo temporarily disables itself when replaying macros with @
. However,
if you invoke @
via a non-recursive map (e.g. nnoremap Q @q
), Peekaboo
doesn't get a chance to do so and your macros may not work as expected. The
workaround is to use recursive maps: nmap Q @q
.
MIT