mirror of
https://github.com/Iron-E/nvim-libmodal
synced 2024-11-14 18:12:52 +00:00
49a02ad692
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.
19 lines
526 B
VimL
19 lines
526 B
VimL
" Recurse counter.
|
|
let s:barModeRecurse = 0
|
|
|
|
" Register 'z' as the map for recursing further (by calling the BarMode function again).
|
|
let s:barModeKeymaps = {
|
|
\ 'z': 'BarModeEnter',
|
|
\}
|
|
|
|
" define the BarMode() function which is called whenever the user presses 'z'
|
|
function! s:BarMode()
|
|
let s:barModeRecurse += 1
|
|
call libmodal#Enter('BAR' . s:barModeRecurse, s:barModeKeymaps)
|
|
let s:barModeRecurse -= 1
|
|
endfunction
|
|
|
|
" Call BarMode() initially to begin the demo.
|
|
command! BarModeEnter call s:BarMode()
|
|
execute 'BarModeEnter'
|