From 00d05d2eb8b2b151224528104dda55eb87f7a9f4 Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 6 Apr 2015 18:27:51 +0200 Subject: [PATCH 1/2] Always return a value in complete#omnifunc --- autoload/vimtex/complete.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/vimtex/complete.vim b/autoload/vimtex/complete.vim index f98c568..ae5a17a 100644 --- a/autoload/vimtex/complete.vim +++ b/autoload/vimtex/complete.vim @@ -65,6 +65,7 @@ function! vimtex#complete#omnifunc(findstart, base) " {{{1 return -2 endif endfor + return -3 else " " Second call: Find list of matches From 59b6f510e7065fb8c0e01440ce36aa2499d61966 Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 6 Apr 2015 20:16:17 +0200 Subject: [PATCH 2/2] Update YouCompleteMe documentation --- doc/vimtex.txt | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/doc/vimtex.txt b/doc/vimtex.txt index 5213818..784868b 100644 --- a/doc/vimtex.txt +++ b/doc/vimtex.txt @@ -881,24 +881,13 @@ It is described as: > Vim's omnicomplete system to provide semantic completions for many other > languages (Ruby, PHP etc.). -To enable automatic completion with YouCompleteMe, it has to be explicitely -enabled for the tex filetype. For tex files, it is also a good idea to disable -the identifier based completion and rely only on semantic completion, which -will use the 'omnifunc' set by |vimtex|. Then the same patterns as above can -be used to trigger the semantic completion. > +To enable automatic completion with |youcompleteme|, use the following options: - " Enable YCM for tex files - let g:ycm_filetype_whitelist.tex = 1 - - " Disable identifier based completion for tex files - autocmd FileType tex let g:ycm_min_num_of_chars_for_completion = 99 - - " Set patterns to trigger semantic completion if !exists('g:ycm_semantic_triggers') let g:ycm_semantic_triggers = {} endif let g:ycm_semantic_triggers.tex = [ - \ '\v\\\a*(ref|cite)\a*([^]]*\])?\{([^}]*,)*[^}]*' + \ 're!\\[A-Za-z]*(ref|cite)[A-Za-z]*([^]]*])?{([^}]*, ?)*' \ ] ==============================================================================