File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # # Syntax highlighting for Dockerfiles
2+ syntax "Dockerfile" " Dockerfile[^ / ]* $ "
3+
4+ # # Keywords
5+ icolor red " ^ (FROM| MAINTAINER| RUN| CMD| LABEL| EXPOSE| ENV| ADD| COPY| ENTRYPOINT| VOLUME| USER| WORKDIR| ONBUILD)[[:space :] ]"
6+
7+ # # Brackets & parenthesis
8+ color brightgreen " (\( | \) | \[ | \] )"
9+
10+ # # Double ampersand
11+ color brightmagenta " &&"
12+
13+ # # Comments
14+ icolor cyan " ^ [[:space :] ]* #. * $ "
15+
16+ # # Blank space at EOL
17+ color ,green " [[:space :] ]+ $ "
18+
19+ # # Strings, single-quoted
20+ color brightwhite " '([^ ' ]| (\\ '))* '" " %[qw ]\{ [^ } ]* \} " " %[qw ]\( [^ )]* \) " " %[qw ]<[^ > ]* >" " %[qw ]\[ [^ ]]* \] " " %[qw ]\$ [^ $]* \$ " " %[qw ]\^ [^ ^]* \^ " " %[qw ]![^ ! ]* !"
21+
22+ # # Strings, double-quoted
23+ color brightwhite " "([^ " ]| (\\ "))* "" " %[QW ]? \{ [^ } ]* \} " " %[QW ]? \( [^ )]* \) " " %[QW ]? <[^ > ]* >" " %[QW ]? \[ [^ ]]* \] " " %[QW ]? \$ [^ $]* \$ " " %[QW ]? \^ [^ ^]* \^ " " %[QW ]? ![^ ! ]* !"
24+
25+ # # Single and double quotes
26+ color brightyellow " ('| \" )"
Original file line number Diff line number Diff line change 1+ Dockerfile.nanorc
2+ =================
3+
4+ Dockerfile syntax highlighting for nano
5+
6+ Single User Installation
7+ ------------------------
8+ 1 . Create a nano syntax directory in your home directory:
9+ * ` mkdir -p ~/.nano/syntax `
10+
11+ 2 . Copy ` Dockerfile.nanorc ` to` ~/.nano/syntax/ `
12+ * ` cp Dockerfile.nanorc ~/.nano/syntax/ `
13+
14+ 3 . Add the following to your ` ~/.nanorc ` to tell nano where to find the ` Dockerfile.nanorc ` file
15+ ```
16+ ## Dockerfile files
17+ include "~/.nano/syntax/Dockerfile.nanorc"
18+ ```
19+
20+ System Wide Installation
21+ ------------------------
22+ 1 . Create a nano syntax directory:
23+ * ` mkdir /usr/local/share/nano `
24+
25+ 2 . Copy ` Dockerfile.nanorc ` to ` /usr/local/share/nano `
26+ * ` cp Dockerfile.nanorc /usr/local/share/nano/ `
27+
28+ 3 . Add the following to your ` /etc/nanorc ` :
29+ ```
30+ ## Dockerfile files
31+ include "/usr/local/share/nano/Dockerfile.nanorc"
32+ ```
You can’t perform that action at this time.
0 commit comments