Mercurial > vim
annotate runtime/syntax/bst.vim @ 12750:0b6c09957b43 v8.0.1253
patch 8.0.1253: still too many old style tests
commit https://github.com/vim/vim/commit/430dc5d360166ca5bb6a73f2c87ae53e09282ecb
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 21:04:47 2017 +0100
patch 8.0.1253: still too many old style tests
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closes #2272)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 21:15:05 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
846 | 1 " Vim syntax file |
2 " Language: BibTeX Bibliography Style | |
1125 | 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.info> |
846 | 4 " Filenames: *.bst |
2034 | 5 " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $ |
846 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
8 if exists("b:current_syntax") |
846 | 9 finish |
10 endif | |
11 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
12 setlocal iskeyword=48-57,#,$,',.,A-Z,a-z |
846 | 13 |
14 syn case ignore | |
15 | |
1125 | 16 syn match bstString +"[^"]*\%("\|$\)+ contains=bstField,bstType,bstError |
17 " Highlight the last character of an unclosed string, but only when the cursor | |
18 " is not beyond it (i.e., it is still being edited). Imperfect. | |
19 syn match bstError '[^"]\%#\@!$' contained | |
20 | |
846 | 21 syn match bstNumber "#-\=\d\+\>" |
22 syn keyword bstNumber entry.max$ global.max$ | |
23 syn match bstComment "%.*" | |
24 | |
25 syn keyword bstCommand ENTRY FUNCTION INTEGERS MACRO STRINGS | |
26 syn keyword bstCommand READ EXECUTE ITERATE REVERSE SORT | |
27 syn match bstBuiltIn "\s[-<>=+*]\|\s:=" | |
28 syn keyword bstBuiltIn add.period$ | |
29 syn keyword bstBuiltIn call.type$ change.case$ chr.to.int$ cite$ | |
30 syn keyword bstBuiltIn duplicate$ empty$ format.name$ | |
31 syn keyword bstBuiltIn if$ int.to.chr$ int.to.str$ | |
32 syn keyword bstBuiltIn missing$ | |
33 syn keyword bstBuiltIn newline$ num.names$ | |
34 syn keyword bstBuiltIn pop$ preamble$ purify$ quote$ | |
35 syn keyword bstBuiltIn skip$ stack$ substring$ swap$ | |
36 syn keyword bstBuiltIn text.length$ text.prefix$ top$ type$ | |
37 syn keyword bstBuiltIn warning$ while$ width$ write$ | |
38 syn match bstIdentifier "'\k*" | |
39 syn keyword bstType article book booklet conference | |
40 syn keyword bstType inbook incollection inproceedings | |
41 syn keyword bstType manual mastersthesis misc | |
42 syn keyword bstType phdthesis proceedings | |
43 syn keyword bstType techreport unpublished | |
44 syn keyword bstField abbr address annote author | |
45 syn keyword bstField booktitle chapter crossref comment | |
46 syn keyword bstField edition editor | |
47 syn keyword bstField howpublished institution journal key month | |
48 syn keyword bstField note number | |
49 syn keyword bstField organization | |
50 syn keyword bstField pages publisher | |
51 syn keyword bstField school series | |
52 syn keyword bstField title type | |
53 syn keyword bstField volume year | |
54 | |
55 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
56 " Only when an item doesn't have highlighting yet |
846 | 57 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
58 hi def link bstComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
59 hi def link bstString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link bstCommand PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
61 hi def link bstBuiltIn Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link bstField Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link bstNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link bstType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link bstIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link bstError Error |
846 | 67 |
68 let b:current_syntax = "bst" | |
69 | |
70 " vim:set ft=vim sts=4 sw=4: |