Ticket #1593: properties.syntax

File properties.syntax, 1.6 KB (added by thorsky, 15 years ago)
Line 
1# Java properties file syntax highlighting
2# Author: Tomas Horsky <tomas@thorsky.info>
3#
4# http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)
5# - Does not support escapes in keys: \ , \=, \:
6# - Additionally highlights numbers, HTML color codes (#AABBCC), some sort of "variable references" (${ref.to.other.key}), and more
7
8context default lightgray
9# Keys
10    keyword linestart \[\s\t\]\{"$%&'()\*\+,-./0123456789;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\}\[!"#$%&'()\*\+,-./0123456789;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\] cyan
11    keyword = yellow
12    keyword : yellow
13# Value continuation (first line)
14    keyword \\\n yellow
15   
16    keyword ${*} brightgreen
17    keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} magenta
18    keyword whole \{-0123456789\}\[0123456789\] brightcyan
19    keyword whole #\{0123456789ABCDEFabcdef\}\[0123456789ABCDEFabcdef\] green
20   
21    keyword whole true white
22    keyword whole false white
23
24# Value continuation (rest of the lines)
25context exclusive \\\n \n lightgray
26    keyword linestart \{\s\t\}\[\s\t\] lightgray black
27    keyword \\\n yellow
28   
29    keyword ${*} brightgreen
30    keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} magenta
31    keyword whole \{-0123456789\}\[0123456789\] brightcyan
32    keyword whole #\{0123456789ABCDEFabcdef\}\[0123456789ABCDEFabcdef\] green
33
34context linestart # \n brown
35    spellcheck
36
37context linestart ! \n brown
38    spellcheck