diff options
author | Guangxiong Lin <[email protected]> | 2022-04-09 14:39:42 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-04-09 14:39:42 +0800 |
commit | ccb9dac28217520be7d51bae9b7539ad07e86bab (patch) | |
tree | e95727698894462c0c336a27c8defba70c673122 | |
parent | 2b1c9e7b4e7e93883aacc3762c70921500704519 (diff) | |
download | dotfiles-ccb9dac28217520be7d51bae9b7539ad07e86bab.tar.gz dotfiles-ccb9dac28217520be7d51bae9b7539ad07e86bab.tar.bz2 dotfiles-ccb9dac28217520be7d51bae9b7539ad07e86bab.zip |
Use omnifunc only when it exists (vim)
-rw-r--r-- | .vim/after/plugin/mucomplete.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim index cdfbe11..839ef12 100644 --- a/.vim/after/plugin/mucomplete.vim +++ b/.vim/after/plugin/mucomplete.vim @@ -4,14 +4,14 @@ 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 s:default_cond = { t -> strlen(&omnifunc) > 0 && t =~# '\%(\.\)$' } let g:mucomplete#can_complete.default = { 'omni': s:default_cond } -let s:c_cond = { t -> t =~# '\%(\.\|->\)$' } +let s:c_cond = { t -> strlen(&omnifunc) > 0 && t =~# '\%(\.\|->\)$' } let g:mucomplete#can_complete.c = { 'omni': s:c_cond } let g:mucomplete#can_complete.objc = { 'omni': s:c_cond } -let s:cpp_cond = { t -> t =~# '\%(\.\|->\|::\)$' } +let s:cpp_cond = { t -> strlen(&omnifunc) > 0 && t =~# '\%(\.\|->\|::\)$' } 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 } |