File: git-ignore.xml

package info (click to toggle)
ksyntax-highlighting 5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,640 kB
  • sloc: xml: 186,656; cpp: 12,164; python: 1,202; sh: 898; perl: 515; ruby: 406; pascal: 393; php: 149; javascript: 140; jsp: 132; lisp: 131; haskell: 124; ansic: 107; f90: 94; cobol: 81; makefile: 78; ml: 75; yacc: 71; csh: 62; erlang: 54; sql: 51; objc: 37; java: 32; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (126 lines) | stat: -rw-r--r-- 8,305 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language [
    <!ENTITY charclasses "(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit)">
]>
<language name="Git Ignore" version="4" kateversion="5.62" section="Configuration"  extensions=".gitignore*;" mimetype="text/x-git-ignore" license="LGPL">
    <highlighting>
        <contexts>
           
            <context name="ini" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Exclude">
                <DetectChar char="#" attribute="Comment" context="Comment"/>
                <DetectChar char="!" attribute="Include - Prefix" context="Include"/>
            </context>
            
            <context name="Comment" attribute="Comment" lineEndContext="#pop">
            </context>                                                                                          


            <context name="Include" attribute="Include" lineEndContext="#pop">
                <AnyChar attribute="Include - Glob" String="?*"/>
                <DetectChar char="/" attribute="Include - Directory Separator"/>
                <DetectChar char="[" attribute="Include - Glob Range" context="IncludeGlobRange"/>
                <DetectChar char="\" attribute="Include - Escape" context="IncludeEscaped"/>
                <RegExpr attribute="Include" String="[^[?*\\/]+"/>
            </context>
            <context name="IncludeEscaped" attribute="Include" lineEndContext="#pop#pop">
                <RegExpr attribute="Include" String="." context="#pop"/>
            </context>

            <context name="IncludeGlobRange" attribute="Include - Glob Range" lineEndContext="#pop#pop" fallthroughContext="IncludeGlobRangeListStart">
                <AnyChar String="^!" attribute="Include - Glob Range" context="IncludeGlobRangeListStart"/>
            </context>
            <context name="IncludeGlobRangeListStart" attribute="Include - Glob Range" lineEndContext="#pop#pop" fallthroughContext="#pop!IncludeGlobRangeList">
                <DetectChar char="]" attribute="Include - Glob Inner Range" context="#pop!IncludeGlobRangeList"/>
            </context>

            <context name="IncludeGlobRangeList" attribute="Include - Glob Inner Range" lineEndContext="#pop#pop" fallthroughContext="IncludeGlobRangeListSpecial">
                <RegExpr attribute="Include - Glob Inner Range" String="([^[\\\]]+|\[(?!(:&charclasses;:|\.[a-z-]\.|=[a-z]=)\]))++" context="IncludeGlobRangeListSpecial"/>
            </context>

            <context name="IncludeGlobRangeListSpecial" attribute="Include - Glob Inner Range" lineEndContext="#pop#pop#pop">
                <DetectChar char="]" attribute="Include - Glob Range" context="#pop#pop#pop"/>
                <DetectChar char="\" attribute="Include - Escape" context="IncludeGlobRangeEscape"/>
                <DetectChar char="[" attribute="Include - Character Class" context="IncludeGlobRangeCharClass"/>
            </context>
            <context name="IncludeGlobRangeCharClass" attribute="Include - Character Class" lineEndContext="#pop#pop#pop#pop">
                <DetectChar char="]" attribute="Include - Character Class" context="#pop#pop"/>
                <AnyChar String=":.=-" attribute="Include - Character Class"/>
                <DetectIdentifier attribute="Include - Character Class"/>
            </context>
            <context name="IncludeGlobRangeEscape" attribute="Include - Glob Inner Range" lineEndContext="#pop#pop#pop#pop">
                <RegExpr attribute="Include - Glob Inner Range" String="." context="#pop#pop"/>
            </context>


            <!-- Exclude rules (same of Include, but with Exclude prefix for attribute) -->

            <context name="Exclude" attribute="Exclude" lineEndContext="#pop">
                <AnyChar attribute="Exclude - Glob" String="?*"/>
                <DetectChar char="/" attribute="Exclude - Directory Separator"/>
                <DetectChar char="[" attribute="Exclude - Glob Range" context="ExcludeGlobRange"/>
                <DetectChar char="\" attribute="Exclude - Escape" context="ExcludeEscaped"/>
                <RegExpr attribute="Exclude" String="[^[?*\\/]+"/>
            </context>
            <context name="ExcludeEscaped" attribute="Exclude" lineEndContext="#pop#pop">
                <RegExpr attribute="Exclude" String="." context="#pop"/>
            </context>

            <context name="ExcludeGlobRange" attribute="Exclude - Glob Range" lineEndContext="#pop#pop" fallthroughContext="ExcludeGlobRangeListStart">
                <AnyChar String="^!" attribute="Exclude - Glob Range" context="ExcludeGlobRangeListStart"/>
            </context>
            <context name="ExcludeGlobRangeListStart" attribute="Exclude - Glob Range" lineEndContext="#pop#pop" fallthroughContext="#pop!ExcludeGlobRangeList">
                <DetectChar char="]" attribute="Exclude - Glob Inner Range" context="#pop!ExcludeGlobRangeList"/>
            </context>

            <context name="ExcludeGlobRangeList" attribute="Exclude - Glob Inner Range" lineEndContext="#pop#pop" fallthroughContext="ExcludeGlobRangeListSpecial">
                <RegExpr attribute="Exclude - Glob Inner Range" String="([^[\\\]]+|\[(?!(:&charclasses;:|\.[a-z-]\.|=[a-z]=)\]))++" context="ExcludeGlobRangeListSpecial"/>
            </context>

            <context name="ExcludeGlobRangeListSpecial" attribute="Exclude - Glob Inner Range" lineEndContext="#pop#pop#pop">
                <DetectChar char="]" attribute="Exclude - Glob Range" context="#pop#pop#pop"/>
                <DetectChar char="\" attribute="Exclude - Escape" context="ExcludeGlobRangeEscape"/>
                <DetectChar char="[" attribute="Exclude - Character Class" context="ExcludeGlobRangeCharClass"/>
            </context>
            <context name="ExcludeGlobRangeCharClass" attribute="Exclude - Character Class" lineEndContext="#pop#pop#pop#pop">
                <DetectChar char="]" attribute="Exclude - Character Class" context="#pop#pop"/>
                <AnyChar String=":.=-" attribute="Exclude - Character Class"/>
                <DetectIdentifier attribute="Exclude - Character Class"/>
            </context>
            <context name="ExcludeGlobRangeEscape" attribute="Exclude - Glob Inner Range" lineEndContext="#pop#pop#pop#pop">
                <RegExpr attribute="Exclude - Glob Inner Range" String="." context="#pop#pop"/>
            </context>

        </contexts>
        
        <itemDatas>
            <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
            <itemData name="Comment" defStyleNum="dsComment"/>

            <itemData name="Exclude" defStyleNum="dsString" spellChecking="false"/>
            <itemData name="Exclude - Directory Separator" defStyleNum="dsNormal" spellChecking="false"/>
            <itemData name="Exclude - Escape" defStyleNum="dsString" spellChecking="false"/>
            <itemData name="Exclude - Glob" defStyleNum="dsOperator" spellChecking="false"/>
            <itemData name="Exclude - Glob Range" defStyleNum="dsNormal" spellChecking="false"/>
            <itemData name="Exclude - Glob Inner Range" defStyleNum="dsString" spellChecking="false"/>
            <itemData name="Exclude - Character Class" defStyleNum="dsString" spellChecking="false"/>

            <itemData name="Include" defStyleNum="dsChar" spellChecking="false"/>
            <itemData name="Include - Prefix" defStyleNum="dsChar" spellChecking="false"/>
            <itemData name="Include - Directory Separator" defStyleNum="dsNormal" spellChecking="false"/>
            <itemData name="Include - Escape" defStyleNum="dsChar" spellChecking="false"/>
            <itemData name="Include - Glob" defStyleNum="dsOperator" spellChecking="false"/>
            <itemData name="Include - Glob Range" defStyleNum="dsNormal" spellChecking="false"/>
            <itemData name="Include - Glob Inner Range" defStyleNum="dsChar" spellChecking="false"/>
            <itemData name="Include - Character Class" defStyleNum="dsChar" spellChecking="false"/>
        </itemDatas>
    
    </highlighting>

    <general>
        <comments>
            <comment name="singleLine" start="#"/>
        </comments>
        <keywords casesensitive="0"/>
    </general>
</language>