From 18d7fa5d2841d35beae189cab6c1934b250438cc Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Thu, 12 Oct 2023 12:18:25 +0800 Subject: Remove intergration with ultisnips --- .vim/after/plugin/mucomplete.vim | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim index f85011a..99b59c8 100644 --- a/.vim/after/plugin/mucomplete.vim +++ b/.vim/after/plugin/mucomplete.vim @@ -2,6 +2,7 @@ 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#always_use_completeopt = 1 let g:mucomplete#can_complete = {} let s:default_cond = { t -> strlen(&omnifunc) > 0 && t =~# '\%(\.\)$' } @@ -19,31 +20,6 @@ let g:mucomplete#can_complete.cpp = { 'omni': s:cpp_cond } let g:mucomplete#can_complete.objcpp = { 'omni': s:cpp_cond } let g:mucomplete#can_complete.cuda = { 'omni': s:cpp_cond } -imap (MUcompleteBwd) -imap pumvisible() ? "\(MUcompleteOut)" : "\" - -" 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)" let s:ledger_cond = { t -> t =~# '\%(:\)$' } let g:mucomplete#can_complete.ledger = { 'omni': s:ledger_cond } -- cgit v1.2.3