Created
January 25, 2017 18:01
-
-
Save descention/8192e9f86258ada919e1525a11ca2cfd to your computer and use it in GitHub Desktop.
Nano syntax highlighting for YAML files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Nano syntax highlighting for YAML files | |
## | |
## Author: Leo Arnold | |
## License: Public Domain | |
## URL: https://gist.github.com/leoarnold/96272e33753aff09163cf18ad641f028 | |
syntax "yaml" "\.(yml|yaml)$" | |
## Keys | |
icolor green "^[[:space:]]*(- )?[.0-9A-Z_/-]+:( |$)" | |
## Structurals | |
color red "(^---|^[[:space:]]*- |: |:$)" | |
## Strings, double-quoted | |
color red ""([^"]|(\\"))*"" | |
color magenta "\$(\w+|\{\w+\})" | |
## Strings, single-quoted | |
color red "'([^']|(\\'))*'" | |
## Comments | |
color yellow "(^|[[:space:]]+)#.*$" | |
## Some common markers | |
color black,red "(TODO|FIXME|\?\?\?)" | |
## Trailing spaces | |
color ,red "[[:space:]]+$" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
had to put the hyphen on the end of the block to prevent an invalid end of range error