nvim-libmodal/examples/key-combos-supress-exit.vim
2020-08-27 12:10:01 -04:00

12 lines
314 B
VimL
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

" Register key commands and what they do.
let s:barModeCombos = {
\ '': 'echom "You cant exit using escape."',
\ 'q': 'let g:barModeExit = 1'
\}
" Tell the mode not to exit automatically.
let g:barModeExit = 0
" Enter the mode using the key combos created before.
call libmodal#Enter('BAR', s:barModeCombos, 1)