Merge pull request #373 from djt308/vimtex.txt

Fix completion patterns for YCM.
This commit is contained in:
Karl Yngve Lervåg 2016-02-18 14:23:00 +01:00
commit 40f58126d7

View File

@ -1394,7 +1394,7 @@ documents with |neocomplete| and |vimtex|s omni completion function: >
let g:neocomplete#sources#omni#input_patterns.tex =
\ '\v\\%('
\ . '\a*cite\a*%(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|\a*ref%(\s*\{[^}]*|range\s*\{[^,}]*%(\}\{)?)'
\ . '|\a*ref%(\s*\{[^}]*|range\s*\{[^,}]*%(}\{)?)'
\ . '|includegraphics\*?%(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|%(include%(only)?|input)\s*\{[^}]*'
\ . ')'
@ -1421,15 +1421,11 @@ To enable automatic completion with |youcompleteme|, use the following options:
endif
let g:ycm_semantic_triggers.tex = [
\ 're!\\[A-Za-z]*cite[A-Za-z]*(\[[^]]*\]){0,2}{[^}]*',
\ 're!\\[A-Za-z]*ref({[^}]*|range{([^,{}]*({})?))',
\ 're!\\includegraphics\*?(\[[^]]*\]){0,2}\{[^}]*',
\ 're!\\[A-Za-z]*ref({[^}]*|range{([^,{}]*(}{)?))',
\ 're!\\includegraphics\*?(\[[^]]*\]){0,2}{[^}]*',
\ 're!\\(include(only)?|input){[^}]*'
\ ]
<
Note: I think the above regexps are not quite correct, and I will be very
happy for pull requests or issues that can help fix these regexps.
VimCompletesMe~
*vimtex-complete-vcm*
A plugin that maps <tab> to trigger the built-in completion that is most