Translucent Vim map for short manual about keys after it -
in (neo)vim, want configure key if passed through one-way mirror.
for example, in normal mode, when type <leader>
, command :echo "w: separate window f: open file c: configure settings"
run (so can @ bottom of screen), <leader>
still has influence on following keys --- such w
, f
, c
, , on --- , <leader><key>
works properly.
i mapped lots keys <leader>
, helpful me display short manual keys follow <leader>
@ bottom of screen when type <leader>
.
thanks.
you can following mapping:
:nnoremap <leader> :echo "w: separate window f: open file c: configure settings"<bar>call feedkeys((exists('g:mapleader') ? g:mapleader : '\'), 't')<cr>
this uses feedkeys()
send <leader>
again after has been shown. however, solution has key timeout downsides mentioned @romainl: message appear after 'timeoutlen'
delay, , have press correct mapping key within 'timeoutlen'
.
alternative
i rather print on <leader><leader>
. there no timeout issues here. if have pressed <leader>
, fail remember what's next key, press <leader>
again, read help, , start again (now memorized) full mapping!
Comments
Post a Comment