mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-01 00:54:24 +03:00
Syntax file for java .properties format
As the format is basically a set of key/value pairs, but allows a number of ways to write them, syntax file tries hard to highlight them all correctly. Plus highlights some specific tokens that can be found in values. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
143f078738
commit
ea083f119b
@ -103,6 +103,9 @@ include j.syntax
|
|||||||
file ..\*\\.(java|JAVA|Java|jav|groovy|GROOVY|Groovy)$ Java\sProgram
|
file ..\*\\.(java|JAVA|Java|jav|groovy|GROOVY|Groovy)$ Java\sProgram
|
||||||
include java.syntax
|
include java.syntax
|
||||||
|
|
||||||
|
file ..\*\\.(properties|config) Java\sFile
|
||||||
|
include properties.syntax
|
||||||
|
|
||||||
file ..\*\\.(cs|CS)$ C\#\sProgram
|
file ..\*\\.(cs|CS)$ C\#\sProgram
|
||||||
include cs.syntax
|
include cs.syntax
|
||||||
|
|
||||||
|
38
syntax/properties.syntax
Normal file
38
syntax/properties.syntax
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Java properties file syntax highlighting
|
||||||
|
# Author: Tomas Horsky <tomas@thorsky.info>
|
||||||
|
#
|
||||||
|
# http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)
|
||||||
|
# - Does not support escapes in keys: \ , \=, \:
|
||||||
|
# - Additionally highlights numbers, HTML color codes (#AABBCC), some sort of "variable references" (${ref.to.other.key}), and more
|
||||||
|
|
||||||
|
context default lightgray
|
||||||
|
# Keys
|
||||||
|
keyword linestart \[\s\t\]\{"$%&'()\*\+,-./0123456789;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\}\[!"#$%&'()\*\+,-./0123456789;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\] cyan
|
||||||
|
keyword = yellow
|
||||||
|
keyword : yellow
|
||||||
|
# Value continuation (first line)
|
||||||
|
keyword \\\n yellow
|
||||||
|
|
||||||
|
keyword ${*} brightgreen
|
||||||
|
keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} magenta
|
||||||
|
keyword whole \{-0123456789\}\[0123456789\] brightcyan
|
||||||
|
keyword whole #\{0123456789ABCDEFabcdef\}\[0123456789ABCDEFabcdef\] green
|
||||||
|
|
||||||
|
keyword whole true white
|
||||||
|
keyword whole false white
|
||||||
|
|
||||||
|
# Value continuation (rest of the lines)
|
||||||
|
context exclusive \\\n \n lightgray
|
||||||
|
keyword linestart \{\s\t\}\[\s\t\] lightgray black
|
||||||
|
keyword \\\n yellow
|
||||||
|
|
||||||
|
keyword ${*} brightgreen
|
||||||
|
keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} magenta
|
||||||
|
keyword whole \{-0123456789\}\[0123456789\] brightcyan
|
||||||
|
keyword whole #\{0123456789ABCDEFabcdef\}\[0123456789ABCDEFabcdef\] green
|
||||||
|
|
||||||
|
context linestart # \n brown
|
||||||
|
spellcheck
|
||||||
|
|
||||||
|
context linestart ! \n brown
|
||||||
|
spellcheck
|
Loading…
Reference in New Issue
Block a user