You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvim-libmodal/examples/keymaps-supress-exit.vim

12 lines
313 B
VimL

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

" 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)