Created
August 27, 2011 02:25
-
-
Save thejhh/1174867 to your computer and use it in GitHub Desktop.
Nanorc for javascript
This file contains 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
## JavaScript | |
## | |
syntax "JS" "\.js$" "\.sjs$" | |
# Reserved Keywords | |
color yellow "\b(instanceof|typeof|break|do|new|var|case|else|return|void|catch|finally|continue|for|switch|while|this|with|debugger|function|throw|default|if|try|delete|in)\b" | |
# Future Reserved Words | |
color brightblue "\b(class|enum|extends|super|import|const|export|implements|let|private|public|yield|static|interface|package|protected)\b" | |
# Punctuators | |
color brightyellow "(\{|\}|\(|\)|\[|\]|\.|\;|\,|<|>|<=|===|\!==|>=|==|\!=|\+|\-|\*|\%|\+\+|\-\-|<<|>>|>>>|\&|\||\^|\!|\~|\&\&|\|\||\?|\:|=|\+=|\-=|\*=|\%=|<\=|>>=|>>>=|\&=|\|=|\^=|\/|\/=)" | |
# Literals | |
color yellow "\b(null|true|false|undefined)\b" | |
# Strings | |
color cyan "\"([^"]*|\\\")*\"" | |
color cyan "'([^']*|\\')*'" | |
# Comments | |
color green "\s*//.*" | |
color brightgreen start="/\*" end="\*/" | |
# Mark non breaking space | |
color yellow,red "Â " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment