Ticket #1869: properties.syntax

File properties.syntax, 1.6 KB (added by victor-homyakov, 15 years ago)

Proposed highlighting, more readable

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{|}~\] yellow
11    keyword = brightcyan
12    keyword : brightcyan
13# Value continuation (first line)
14    keyword \\\n yellow
15    keyword ${*} brightgreen
16    keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} magenta
17    keyword whole \{-0123456789\}\[0123456789\] brightcyan
18    keyword whole #\{0123456789ABCDEFabcdef\}\[0123456789ABCDEFabcdef\] green
19    keyword whole true white
20    keyword whole false white
21
22# Value continuation (rest of the lines)
23context exclusive \\\n \n lightgray
24    keyword linestart \{\s\t\}\[\s\t\] lightgray black
25    keyword \\\n yellow
26    keyword ${*} brightgreen
27    keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} magenta
28    keyword whole \{-0123456789\}\[0123456789\] brightcyan
29    keyword whole #\{0123456789ABCDEFabcdef\}\[0123456789ABCDEFabcdef\] green
30
31context linestart # \n brown
32    spellcheck
33
34context linestart ! \n brown
35    spellcheck