annotate runtime/syntax/gitattributes.vim @ 33636:53416c49a7ab v9.0.2059

patch 9.0.2059: outstanding exceptions may be skipped Commit: https://github.com/vim/vim/commit/0ab500dede4edd8d5aee7ddc63444537be527871 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Oct 21 11:59:42 2023 +0200 patch 9.0.2059: outstanding exceptions may be skipped Problem: outstanding exceptions may be skipped Solution: When restoring exception state, process remaining outstanding exceptions closes: #13386 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 21 Oct 2023 12:15:03 +0200
parents fee9eccee266
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: git attributes
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: ObserverOfTime <chronobserver@disroot.org>
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Filenames: .gitattributes, *.git/info/attributes
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2022 Sep 09
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists('b:current_syntax')
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let s:cpo_save = &cpoptions
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 set cpoptions&vim
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 " Comment
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 syn keyword gitattributesTodo contained TODO FIXME XXX
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn match gitattributesComment /^\s*#.*/ contains=gitattributesTodo
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 " Pattern
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn match gitattributesPattern /^\s*#\@!\(".\+"\|\S\+\)/ skipwhite
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 \ nextgroup=gitattributesAttrPrefixed,gitattributesAttrAssigned skipwhite
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 \ contains=gitattributesGlob,gitattributesRange,gitattributesSeparator
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn match gitattributesGlob /\\\@1<![?*]/ contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn match gitattributesRange /\\\@1<!\[.\{-}\]/ contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 syn match gitattributesSeparator '/' contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 " Attribute
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 syn match gitattributesAttrPrefixed /[!-]\?[A-Za-z0-9_.][-A-Za-z0-9_.]*/
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 \ transparent contained skipwhite
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ nextgroup=gitattributesAttrPrefixed,gitattributesAttrAssigned
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 \ contains=gitattributesPrefix,gitattributesName
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn match gitattributesAttrAssigned /[A-Za-z0-9_.][-A-Za-z0-9_.]*=\S\+/
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 \ transparent contained skipwhite
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 \ nextgroup=gitattributesAttrPrefixed,gitattributesAttrAssigned
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 \ contains=gitattributesName,gitattributesAssign,gitattributesBoolean,gitattributesString
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn match gitattributesName /[A-Za-z0-9_.][-A-Za-z0-9_.]*/
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 \ contained nextgroup=gitattributesAssign
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match gitattributesPrefix /[!-]/ contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 \ nextgroup=gitAttributesName
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn match gitattributesAssign '=' contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 \ nextgroup=gitattributesBoolean,gitattributesString
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 syn match gitattributesString /=\@1<=\S\+/ contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 syn keyword gitattributesBoolean true false contained
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 " Macro
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn match gitattributesMacro /^\s*\[attr\]\s*\S\+/
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 \ nextgroup=gitattributesAttribute skipwhite
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 hi def link gitattributesAssign Operator
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 hi def link gitattributesBoolean Boolean
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 hi def link gitattributesComment Comment
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 hi def link gitattributesGlob Special
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 hi def link gitattributesMacro Define
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 hi def link gitattributesName Identifier
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 hi def link gitattributesPrefix SpecialChar
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 hi def link gitattributesRange Special
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 hi def link gitattributesSeparator Delimiter
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 hi def link gitattributesString String
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 hi def link gitattributesTodo Todo
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 let b:current_syntax = 'gitattributes'
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 let &cpoptions = s:cpo_save
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 unlet s:cpo_save