Skip to content

Instantly share code, notes, and snippets.

@mintsoft
Created July 2, 2013 21:29
Show Gist options
  • Select an option

  • Save mintsoft/5913333 to your computer and use it in GitHub Desktop.

Select an option

Save mintsoft/5913333 to your computer and use it in GitHub Desktop.
Nano XML Highlighting
syntax "ml" ".*\.(xml|xul|rdf|rss|xbl|sgml?)$"
color white "^.+$"
# Attribute names
color brightblue start="<" end=">"
# Attribute text
color brightgreen ""[^"]+""
# Tag names
color brightcyan "<[^> ]+"
# Alligators
color cyan "<"
color cyan ">"
# DTDs
color brightyellow start="<!DOCTYPE" end="[/]?>"
# Comments
color green start="<!--" end="-->"
# Entities
color red "&[^;]*;"
# Preprocessing instructions
color brightred "<\?.+?>"
color red "<\?"
color red "\?>"
# CDATA
color white start="<!\[CDATA\[" end="\]\]>"
color brightwhite "<!\[CDATA\["
color brightwhite "\]\]>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment