let g:mucomplete#enable_auto_at_startup = 1 let g:mucomplete#minimum_prefix_length = 1 let g:mucomplete#empty_text_auto = 1 let g:mucomplete#no_mappings = 1 let g:mucomplete#can_complete = {} let s:default_cond = { t -> t =~# '\%(\.\)$' } let g:mucomplete#can_complete.default = { 'omni': s:default_cond } let g:mucomplete#chains = {} let g:mucomplete#chains.default = \ [ 'ulti', 'user', 'omni', 'tags', 'keyn', 'path' ] imap (MUcompleteBwd) " Integrate with UltiSnips inoremap MyCR \ mucomplete#ultisnips#expand_snippet("\") imap MyCR let g:ulti_expand_or_jump_res = 0 fun! TryUltiSnips() if !pumvisible() " With the pop-up menu open, let Tab move down call UltiSnips#ExpandSnippetOrJump() endif return '' endf fun! TryMUcomplete() return g:ulti_expand_or_jump_res ? "" : "\(MUcompleteFwd)" endf inoremap (TryUlti) =TryUltiSnips() imap (TryMU) TryMUcomplete() imap "\(TryUlti)\(TryMU)" packadd vim-mucomplete