annotate runtime/syntax/gitattributes.vim @ 34633:45d13860879a v9.1.0203

patch 9.1.0203: build-error on GNU/Hurd Commit: https://github.com/vim/vim/commit/4a95377593d06599a88670fcb6b49041a4b47abe Author: James McCoy <jamessan@jamessan.com> Date: Mon Mar 25 16:22:23 2024 +0100 patch 9.1.0203: build-error on GNU/Hurd Problem: build-error on GNU HURD Solution: Define _XOPEN_SOURCE like for Android and Cygwin (James McCoy) strptime() requires _XOPEN_SOURCE to be defined for its declaration to be visible. This is already done for non-Android Linux and Cygwin, but also needs to be exposed for GNU/Hurd. closes: #14285 Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 25 Mar 2024 16:30:12 +0100
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