comparison runtime/syntax/bst.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents 7bc41231fbc7
children 46763b01cd9a
comparison
equal deleted inserted replaced
10047:a62862410ca1 10048:43efa4f5a8ea
2 " Language: BibTeX Bibliography Style 2 " Language: BibTeX Bibliography Style
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.info> 3 " Maintainer: Tim Pope <vimNOSPAM@tpope.info>
4 " Filenames: *.bst 4 " Filenames: *.bst
5 " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $ 5 " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $
6 6
7 " For version 5.x: Clear all syntax items 7 " quit when a syntax file was already loaded
8 " For version 6.x: Quit when a syntax file was already loaded 8 if exists("b:current_syntax")
9 if version < 600
10 syntax clear
11 elseif exists("b:current_syntax")
12 finish 9 finish
13 endif 10 endif
14 11
15 if version < 600 12 setlocal iskeyword=48-57,#,$,',.,A-Z,a-z
16 command -nargs=1 SetIsk set iskeyword=<args>
17 else
18 command -nargs=1 SetIsk setlocal iskeyword=<args>
19 endif
20 SetIsk 48-57,#,$,',.,A-Z,a-z
21 delcommand SetIsk
22 13
23 syn case ignore 14 syn case ignore
24 15
25 syn match bstString +"[^"]*\%("\|$\)+ contains=bstField,bstType,bstError 16 syn match bstString +"[^"]*\%("\|$\)+ contains=bstField,bstType,bstError
26 " Highlight the last character of an unclosed string, but only when the cursor 17 " Highlight the last character of an unclosed string, but only when the cursor
60 syn keyword bstField school series 51 syn keyword bstField school series
61 syn keyword bstField title type 52 syn keyword bstField title type
62 syn keyword bstField volume year 53 syn keyword bstField volume year
63 54
64 " Define the default highlighting. 55 " Define the default highlighting.
65 " For version 5.7 and earlier: only when not done already 56 " Only when an item doesn't have highlighting yet
66 " For version 5.8 and later: only when an item doesn't have highlighting yet 57 command -nargs=+ HiLink hi def link <args>
67 if version >= 508 || !exists("did_bst_syn_inits")
68 if version < 508
69 let did_bst_syn_inits = 1
70 command -nargs=+ HiLink hi link <args>
71 else
72 command -nargs=+ HiLink hi def link <args>
73 endif
74 58
75 HiLink bstComment Comment 59 HiLink bstComment Comment
76 HiLink bstString String 60 HiLink bstString String
77 HiLink bstCommand PreProc 61 HiLink bstCommand PreProc
78 HiLink bstBuiltIn Statement 62 HiLink bstBuiltIn Statement
79 HiLink bstField Special 63 HiLink bstField Special
80 HiLink bstNumber Number 64 HiLink bstNumber Number
81 HiLink bstType Type 65 HiLink bstType Type
82 HiLink bstIdentifier Identifier 66 HiLink bstIdentifier Identifier
83 HiLink bstError Error 67 HiLink bstError Error
84 delcommand HiLink 68 delcommand HiLink
85 endif
86 69
87 let b:current_syntax = "bst" 70 let b:current_syntax = "bst"
88 71
89 " vim:set ft=vim sts=4 sw=4: 72 " vim:set ft=vim sts=4 sw=4: