Created
March 25, 2018 14:55
-
-
Save ltning/8bdb8d0390128a7c22878c29ca2052fe to your computer and use it in GitHub Desktop.
nano syntax highlighting for yaml
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 | |
## Modified by: Eirik Oeverby | |
## License: Public Domain | |
## URL: https://gist.github.com/leoarnold/96272e33753aff09163cf18ad641f028 | |
syntax "yaml" "\.(yml|yaml)$" | |
## Keys | |
#icolor green "^[[:space:]]*(- )?[.0-9A-Z_/-]+:( |$)" | |
icolor white "^[[:space:]]*[.0-9a-zA-Z_/-:]+:( |$)" | |
color green "(::)" | |
color brightwhite "[.0-9a-zA-Z_/-]+:( |$)" | |
## Structurals | |
color brightred "(^---|^[[:space:]]*- |: |:$)" | |
## Strings, double-quoted | |
color brightgreen ""([^"]|(\\"))*"" | |
color brightgreen "\$(\w+|\{\w+\})" | |
## Strings, single-quoted | |
color green "'([^']|(\\'))*'" | |
## Variables | |
color yellow "%\{.*?\}" | |
## Functions | |
color brightyellow "(%\{.*?\(|\).*?\})" | |
## Comments | |
color cyan "(^|[[:space:]]+)#.*$" | |
## Some common markers | |
color brightcyan "(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