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/lua/prompt-callback.lua

14 lines
317 B
Lua

let s:commandList = ['new', 'close', 'last']
function! s:BarMode() abort
if g:tabModeInput ==# 'new'
execute 'tabnew'
elseif g:tabModeInput ==# 'close'
execute 'tabclose'
elseif g:tabModeInput ==# 'last'
execute 'tablast'
endif
endfunction
call libmodal#Prompt('TAB', funcref('s:BarMode'), s:commandList)