Monday, April 23, 2018

Case-insensitive completefunc

Hi

I've been reading the help to try to make the complete menu case
insensitive and I see the 'icase' setting, but for the life of me I
can't figure out how to use it.

If I add it to the return value in my completefunc I just get errors.

fun! UserComplete(findstart, base)
let line = getline(line('.'))
if line =~ '^\(To\|Cc\|Bcc\|From\|Reply-To\):'
return CompleteEmails(a:findstart, a:base)
endif
endfun

I've tried making the return value a list by encasing in {} and
adding , 'icase': 1 (also '1').

I've tried adding it to the end of the call to add an item to the
list:

for m in split(system('completeemails ' . shellescape(a:base)), '\n')
call add(res, m)
endfor
add (res, 'icase': 1)
return res

etc.

Any help is hugely appreciated.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: