Minor adjustment of complete pattern regexps

This commit is contained in:
Karl Yngve Lervåg 2016-02-17 22:52:07 +01:00
parent 2e8c4c0f4e
commit 3145d2554f
2 changed files with 10 additions and 10 deletions

View File

@ -68,7 +68,7 @@ endfunction
" {{{1 Bibtex
let s:bib = {
\ 'pattern' : '\v\\\a*cite\a*%(\s*\[[^]]*\]){0,2}\s*\{[^{}]*',
\ 'pattern' : '\v\\\a*cite\a*%(\s*\[[^]]*\]){0,2}\s*\{[^}]*',
\ 'enabled' : 1,
\ 'bibs' : '''\v%(%(\\@<!%(\\\\)*)@<=\%.*)@<!'
\ . '\\(bibliography|add(bibresource|globalbib|sectionbib))'
@ -223,7 +223,7 @@ endfunction
" {{{1 Labels
let s:ref = {
\ 'pattern' : '\v\\v?%(auto|eq|page|[cC]|labelc)?ref\s*\{[^{}]*',
\ 'pattern' : '\v\\v?%(auto|eq|page|[cC]|labelc)?ref\s*\{[^}]*',
\ 'enabled' : 1,
\}
@ -322,7 +322,7 @@ endfunction
" {{{1 Filenames (\includegraphics)
let s:img = {
\ 'pattern' : '\v\\includegraphics%(\s*\[[^]]*\])?\s*\{[^{}]*',
\ 'pattern' : '\v\\includegraphics%(\s*\[[^]]*\])?\s*\{[^}]*',
\ 'enabled' : 1,
\}
@ -355,7 +355,7 @@ endfunction
" {{{1 Filenames (\input and \include)
let s:inc = {
\ 'pattern' : '\v\\%(include%(only)?|input)\s*\{[^{}]*',
\ 'pattern' : '\v\\%(include%(only)?|input)\s*\{[^}]*',
\ 'enabled' : 1,
\}
@ -375,7 +375,7 @@ endfunction
" {{{1 Glossary
let s:glc = {
\ 'pattern' : '\v\\glc\s*\{[^{}]*',
\ 'pattern' : '\v\\glc\s*\{[^}]*',
\ 'enabled' : 1,
\}

View File

@ -1393,9 +1393,9 @@ documents with |neocomplete| and |vimtex|s omni completion function: >
endif
let g:neocomplete#sources#omni#input_patterns.tex =
\ '\v\\%('
\ . '\a*%(cite)\a*%(\s*\[[^]]*\]){0,2}\s*\{[^{}]*'
\ . '|includegraphics%(\s*\[[^]]*\])?\s*\{[^{}]*'
\ . '|%(include%(only)?|input)\s*\{[^{}]*'
\ . '\a*%(cite)\a*%(\s*\[[^]]*\]){0,2}\s*\{[^}]*'
\ . '|includegraphics%(\s*\[[^]]*\])?\s*\{[^}]*'
\ . '|%(include%(only)?|input)\s*\{[^}]*'
\ . ')'
<
YouCompleteMe~
@ -1419,9 +1419,9 @@ To enable automatic completion with |youcompleteme|, use the following options:
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers.tex = [
\ 're!\\[A-Za-z]*(cite)[A-Za-z]*(\[[^]]*\]){0,2}\{[^{}]*',
\ 're!\\[A-Za-z]*(cite)[A-Za-z]*(\[[^]]*\]){0,2}{[^}]*',
\ 're!\\includegraphics([^]]*])?{[^}]*',
\ 're!\\(include(only)?|input)\{[^{}]*'
\ 're!\\(include(only)?|input){[^}]*'
\ ]
<
VimCompletesMe~