Mercurial > vim
diff runtime/syntax/bib.vim @ 12756:3b26420fc639
Long overdue runtime update.
commit https://github.com/vim/vim/commit/01164a6546b4c635daf96a1f17d1cb2d07f32a66
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 22:58:42 2017 +0100
Long overdue runtime update.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 23:00:08 +0100 |
parents | 01521953bdf1 |
children |
line wrap: on
line diff
--- 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 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"