diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-07 23:50:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-07 23:50:10 +0100 |
| commit | bbf730aa3180c4522c34f4529130827874be25d1 (patch) | |
| tree | fc1c6d82d3e340ebfc268b8274c24f1790c3849f /runtime/syntax/bib.vim | |
| parent | ae569ea57b1df1b450803b6d23ab8c315dd72e72 (diff) | |
| parent | 2ca59638ba04d11c397496d4f12f4d24e3461f0e (diff) | |
| download | rneovim-bbf730aa3180c4522c34f4529130827874be25d1.tar.gz rneovim-bbf730aa3180c4522c34f4529130827874be25d1.tar.bz2 rneovim-bbf730aa3180c4522c34f4529130827874be25d1.zip | |
Merge #7503 from justinmk/vim-patches
Diffstat (limited to 'runtime/syntax/bib.vim')
| -rw-r--r-- | runtime/syntax/bib.vim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index f2b99e961b..ac8dcda678 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -2,7 +2,7 @@ " Language: BibTeX (bibliographic database format for (La)TeX) " Maintainer: Bernd Feige <Bernd.Feige@gmx.net> " Filenames: *.bib -" Last Change: 2016 Sep 12 +" Last Change: 2017 Sep 29 " Thanks to those who pointed out problems with this file or supplied fixes! @@ -81,16 +81,18 @@ syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField syn match bibVariable contained /[^{}," \t=]/ syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry -syn region bibMath contained start=/\$/ end=/\$/ skip=/\(\\\$\)/ +syn region bibMath contained start=/\(\\\)\@<!\$/ end=/\$/ skip=/\(\\\$\)/ syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bibEntryKw,bibNSEntryKw,bibBrace,bibParen,bibQuote,bibVariable -syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField +syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField,bibComment3 " Actually, 5.8 <= Vim < 6.0 would ignore the `fold' keyword anyway, but Vim<5.8 would produce " an error, so we explicitly distinguish versions with and without folding functionality: syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment syn region bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry +" biblatex style comments inside a bibEntry +syn match bibComment3 "%.*" " Synchronization " =============== @@ -111,6 +113,7 @@ hi def link bibVariable Constant hi def link bibUnescapedSpecial Error hi def link bibComment Comment hi def link bibComment2 Comment +hi def link bibComment3 Comment let b:current_syntax = "bib" |