nvim-libmodal/examples/keymaps-supress-exit.vim
Iron-E 49a02ad692
merge!: cleanup the plugin
This was my first plugin. Looking back on it, it was full of bad
design decisions (and I have elected to keep most of the user-facing
ones for backwards-compatability). This merge tries to uncrustify the
plugin by standardizing the documentation, removing much unecessary
code, reorganizing the internal structures, and removing references to
my own made-up terminology.
2022-04-25 17:59:33 -04:00

12 lines
313 B
VimL
Raw 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:barModeKeymaps = {
\ '': '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 keymaps created before.
call libmodal#Enter('BAR', s:barModeKeymaps, 1)