Mercurial > vim
comparison runtime/syntax/bib.vim @ 484:f012c4ed8c38 v7.0132
updated for version 7.0132
author | vimboss |
---|---|
date | Fri, 19 Aug 2005 20:40:30 +0000 |
parents | 3fc0f57ecb91 |
children | fd09a9c8468e |
comparison
equal
deleted
inserted
replaced
483:70afa17bfc01 | 484:f012c4ed8c38 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: BibTeX (bibliographic database format for (La)TeX) | 2 " Language: BibTeX (bibliographic database format for (La)TeX) |
3 " Maintainer: Bernd Feige <Bernd.Feige@gmx.net> | 3 " Maintainer: Bernd Feige <Bernd.Feige@gmx.net> |
4 " Filenames: *.bib | 4 " Filenames: *.bib |
5 " Last Change: Apr 26, 2001 | 5 " Last Change: Aug 02, 2005 |
6 " URL: http://home.t-online.de/home/Bernd.Feige/bib.vim | |
7 | 6 |
8 " Thanks to those who pointed out problems with this file or supplied fixes! | 7 " Thanks to those who pointed out problems with this file or supplied fixes! |
9 | 8 |
10 " Initialization | 9 " Initialization |
11 " ============== | 10 " ============== |
45 " Matches | 44 " Matches |
46 " ======= | 45 " ======= |
47 syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 | 46 syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 |
48 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField | 47 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField |
49 syn match bibVariable contained /[^{}," \t=]/ | 48 syn match bibVariable contained /[^{}," \t=]/ |
50 syn region bibComment start=/^/ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry | 49 syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry |
51 syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents | 50 syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents |
52 syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents | 51 syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents |
53 syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents | 52 syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents |
54 syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bibEntryKw,bibNSEntryKw,bibBrace,bibParen,bibQuote,bibVariable | 53 syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bibEntryKw,bibNSEntryKw,bibBrace,bibParen,bibQuote,bibVariable |
55 syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField | 54 syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField |
58 if version < 600 | 57 if version < 600 |
59 syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment | 58 syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment |
60 else | 59 else |
61 syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment | 60 syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment |
62 endif | 61 endif |
62 syn region bibComment2 start=/@Comment[{(]/ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry | |
63 | 63 |
64 " Synchronization | 64 " Synchronization |
65 " =============== | 65 " =============== |
66 syn sync match All grouphere bibEntry /^\s*@/ | 66 syn sync match All grouphere bibEntry /^\s*@/ |
67 syn sync maxlines=200 | 67 syn sync maxlines=200 |
84 HiLink bibNSEntryKw PreProc | 84 HiLink bibNSEntryKw PreProc |
85 HiLink bibKey Special | 85 HiLink bibKey Special |
86 HiLink bibVariable Constant | 86 HiLink bibVariable Constant |
87 HiLink bibUnescapedSpecial Error | 87 HiLink bibUnescapedSpecial Error |
88 HiLink bibComment Comment | 88 HiLink bibComment Comment |
89 HiLink bibComment2 Comment | |
89 delcommand HiLink | 90 delcommand HiLink |
90 endif | 91 endif |
91 | 92 |
92 let b:current_syntax = "bib" | 93 let b:current_syntax = "bib" |