inoremap <F5> <C-R>=ListMonths()<CR>
func! ListMonths()
call complete(col('.'), ['January', 'February', 'March',
\ 'April', 'May', 'June', 'July', 'August', 'September',
\ 'October', 'November', 'December'])
return ''
endfunc
Encontrou! Escondido em que Grimoire eles estão tentando nos dizer são docs =)
======================= Meu script final é algo como
inoremap <F5> <C-R>=CustomComplete()<CR>
func! CustomComplete()
echom 'move to start of last word'
normal b
echom 'select word under cursor'
let b:word = expand('<cword>')
echom '->'.b:word.'<-'
echom 'save position'
let b:position = col('.')
echom '->'.b:position.'<-'
normal e
normal l
echom 'move to end of word'
let b:list = ["spoogle","spangle","frizzle"]
let b:matches = []
echom 'begin checking for completion'
for item in b:list
echom 'checking '
echom '->'.item.'<-'
if(match(item,'^'.b:word)==0)
echom 'adding to matches'
echom '->'.item.'<-'
call add(b:matches,item)
endif
endfor
call complete(b:position, b:matches)
return ''
endfunc