Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/serialhex/nano-highlight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Núñez Deschamps <pavelnunez@users.noreply.github.com>2020-05-05 02:54:04 +0300
committerGitHub <noreply@github.com>2020-05-05 02:54:04 +0300
commit3913e7e996b6a6ca3e6a9c819668c951f8d9e69d (patch)
tree3e6b3a3552130acca04a53149c8fe681bde5763b
parentdda863bd5611eddd2e04f8750cf47aa6a11cf168 (diff)
Add support for Dockerfiles
Add basic support for Dockerfiles. It shows syntax highlighting for reserved words and comments when working with Dockerfiles and nano.
-rw-r--r--dockerfile.nanorc27
1 files changed, 27 insertions, 0 deletions
diff --git a/dockerfile.nanorc b/dockerfile.nanorc
new file mode 100644
index 0000000..b76ec35
--- /dev/null
+++ b/dockerfile.nanorc
@@ -0,0 +1,27 @@
+## Syntax highlighting for Dockerfiles
+syntax "Dockerfile" "Dockerfile[^/]*$"
+
+## Keywords
+icolor red "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD)[[:space:]]"
+
+## Brackets & parenthesis
+color brightgreen "(\(|\)|\[|\])"
+
+## Double ampersand
+color brightmagenta "&&"
+
+## Comments
+icolor cyan "^[[:space:]]*#.*$"
+
+## Blank space at EOL
+color ,green "[[:space:]]+$"
+
+## Strings, single-quoted
+color brightwhite "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
+
+## Strings, double-quoted
+color brightwhite ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
+
+## Single and double quotes
+color brightyellow "('|\")"
+