Merge remote branch 'svn-vim' into vim
[MacVim.git] / runtime / syntax / lss.vim
blob6620707f9285b800fb5105af647ee0a3f2e057df
1 " Vim syntax file
2 " Language:     Lynx 2.7.1 style file
3 " Maintainer:   Scott Bigham <dsb@killerbunnies.org>
4 " Last Change:  2004 Oct 06
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
8 if version < 600
9   syntax clear
10 elseif exists("b:current_syntax")
11   finish
12 endif
14 " This setup is probably atypical for a syntax highlighting file, because
15 " most of it is not really intended to be overrideable.  Instead, the
16 " highlighting is supposed to correspond to the highlighting specified by
17 " the .lss file entries themselves; ie. the "bold" keyword should be bold,
18 " the "red" keyword should be red, and so forth.  The exceptions to this
19 " are comments, of course, and the initial keyword identifying the affected
20 " element, which will inherit the usual Identifier highlighting.
22 syn match lssElement "^[^:]\+" nextgroup=lssMono
24 syn match lssMono ":[^:]\+" contained nextgroup=lssFgColor contains=lssReverse,lssUnderline,lssBold,lssStandout
26 syn keyword     lssBold         bold            contained
27 syn keyword     lssReverse      reverse         contained
28 syn keyword     lssUnderline    underline       contained
29 syn keyword     lssStandout     standout        contained
31 syn match lssFgColor ":[^:]\+" contained nextgroup=lssBgColor contains=lssRedFg,lssBlueFg,lssGreenFg,lssBrownFg,lssMagentaFg,lssCyanFg,lssLightgrayFg,lssGrayFg,lssBrightredFg,lssBrightgreenFg,lssYellowFg,lssBrightblueFg,lssBrightmagentaFg,lssBrightcyanFg
33 syn case ignore
34 syn keyword     lssRedFg                red             contained
35 syn keyword     lssBlueFg               blue            contained
36 syn keyword     lssGreenFg              green           contained
37 syn keyword     lssBrownFg              brown           contained
38 syn keyword     lssMagentaFg            magenta         contained
39 syn keyword     lssCyanFg               cyan            contained
40 syn keyword     lssLightgrayFg          lightgray       contained
41 syn keyword     lssGrayFg               gray            contained
42 syn keyword     lssBrightredFg          brightred       contained
43 syn keyword     lssBrightgreenFg        brightgreen     contained
44 syn keyword     lssYellowFg             yellow          contained
45 syn keyword     lssBrightblueFg         brightblue      contained
46 syn keyword     lssBrightmagentaFg      brightmagenta   contained
47 syn keyword     lssBrightcyanFg         brightcyan      contained
48 syn case match
50 syn match lssBgColor ":[^:]\+" contained contains=lssRedBg,lssBlueBg,lssGreenBg,lssBrownBg,lssMagentaBg,lssCyanBg,lssLightgrayBg,lssGrayBg,lssBrightredBg,lssBrightgreenBg,lssYellowBg,lssBrightblueBg,lssBrightmagentaBg,lssBrightcyanBg,lssWhiteBg
52 syn case ignore
53 syn keyword     lssRedBg                red             contained
54 syn keyword     lssBlueBg               blue            contained
55 syn keyword     lssGreenBg              green           contained
56 syn keyword     lssBrownBg              brown           contained
57 syn keyword     lssMagentaBg            magenta         contained
58 syn keyword     lssCyanBg               cyan            contained
59 syn keyword     lssLightgrayBg          lightgray       contained
60 syn keyword     lssGrayBg               gray            contained
61 syn keyword     lssBrightredBg          brightred       contained
62 syn keyword     lssBrightgreenBg        brightgreen     contained
63 syn keyword     lssYellowBg             yellow          contained
64 syn keyword     lssBrightblueBg         brightblue      contained
65 syn keyword     lssBrightmagentaBg      brightmagenta   contained
66 syn keyword     lssBrightcyanBg         brightcyan      contained
67 syn keyword     lssWhiteBg              white           contained
68 syn case match
70 syn match lssComment "#.*$"
72 " Define the default highlighting.
73 " For version 5.7 and earlier: only when not done already
74 " For version 5.8 and later: only when an item doesn't have highlighting yet
75 if version >= 508 || !exists("did_lss_syntax_inits")
76   if version < 508
77     let did_lss_syntax_inits = 1
78   endif
80   hi def link lssComment Comment
81   hi def link lssElement Identifier
83   hi def lssBold                term=bold cterm=bold
84   hi def lssReverse             term=reverse cterm=reverse
85   hi def lssUnderline           term=underline cterm=underline
86   hi def lssStandout            term=standout cterm=standout
88   hi def lssRedFg               ctermfg=red
89   hi def lssBlueFg              ctermfg=blue
90   hi def lssGreenFg             ctermfg=green
91   hi def lssBrownFg             ctermfg=brown
92   hi def lssMagentaFg           ctermfg=magenta
93   hi def lssCyanFg              ctermfg=cyan
94   hi def lssGrayFg              ctermfg=gray
95   if $COLORTERM == "rxvt"
96     " On rxvt's, bright colors are activated by setting the bold attribute.
97     hi def lssLightgrayFg       ctermfg=gray cterm=bold
98     hi def lssBrightredFg       ctermfg=red cterm=bold
99     hi def lssBrightgreenFg     ctermfg=green cterm=bold
100     hi def lssYellowFg          ctermfg=yellow cterm=bold
101     hi def lssBrightblueFg      ctermfg=blue cterm=bold
102     hi def lssBrightmagentaFg   ctermfg=magenta cterm=bold
103     hi def lssBrightcyanFg      ctermfg=cyan cterm=bold
104   else
105     hi def lssLightgrayFg       ctermfg=lightgray
106     hi def lssBrightredFg       ctermfg=lightred
107     hi def lssBrightgreenFg     ctermfg=lightgreen
108     hi def lssYellowFg          ctermfg=yellow
109     hi def lssBrightblueFg      ctermfg=lightblue
110     hi def lssBrightmagentaFg   ctermfg=lightmagenta
111     hi def lssBrightcyanFg      ctermfg=lightcyan
112   endif
114   hi def lssRedBg               ctermbg=red
115   hi def lssBlueBg              ctermbg=blue
116   hi def lssGreenBg             ctermbg=green
117   hi def lssBrownBg             ctermbg=brown
118   hi def lssMagentaBg           ctermbg=magenta
119   hi def lssCyanBg              ctermbg=cyan
120   hi def lssLightgrayBg         ctermbg=lightgray
121   hi def lssGrayBg              ctermbg=gray
122   hi def lssBrightredBg         ctermbg=lightred
123   hi def lssBrightgreenBg       ctermbg=lightgreen
124   hi def lssYellowBg            ctermbg=yellow
125   hi def lssBrightblueBg        ctermbg=lightblue
126   hi def lssBrightmagentaBg     ctermbg=lightmagenta
127   hi def lssBrightcyanBg        ctermbg=lightcyan
128   hi def lssWhiteBg             ctermbg=white ctermfg=black
129 endif
131 let b:current_syntax = "lss"
133 " vim: ts=8