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

15 lines
326 B
VimL

let s:commandList = ['new', 'close', 'last']
function! s:fooMode() abort
let l:userInput = g:fooModeInput
if userInput == 'new'
tabnew
elseif userInput == 'close'
tabclose
elseif userInput == 'last'
tablast
endif
endfunction
call luaeval("require('libmodal').prompt.enter('FOO', 's:fooMode', _A)", s:commandList)