syntax "lua" "\.lua$" color black "def [a-zA-Z_0-9]+" color brightblue "\<(break|do|else|elseif|end|for|function|if|repeat|return|then|until|while)\>" color blue "\<(and|or|in|true|false|not|nil|local)\>" color yellow "\<(module|assert|require|package|error|true|false)\>" color blue "\+|\-|\*|\/|\%|\^|\#|\=\=|\~\=|\<\=|\>\=|\<|\>|\=|\;|\:|\,|\.|\.\.|\.\.\." color yellow "\[|\]|\(|\)|\{|\}" color green "([\"'])[^\"]*?[^\\]\1" color green start="\[\[" end="\]\]\"" color cyan "\-\-.*$"
Tag: nano
Syntax Highlighting with nano – nanorc for lolcode
## Here iz TEH syntax highlight for lolcode ## based on the example for C/C++. ## no can has moar color syntax "lolcode" "\.lol" ## things color brightred "\<[A-Z_][0-9A-Z_]+\>" color brightred "\<[[:alnum:]]*\>" ## ## types color green "\<(YARN|NUMBR|TROOF|BUKKIT|NOOB)\>" ## ## stuff color brightgreen "\<(LINE|WORD|LETTAR)\>" ## ## aritmetric (TIEMZ xould be in TIEM?) anyway, all 3 stay as a keyword ## also the MODZ (not in yr spec 1.1) iz highlighted for modulo color brightgreen "\<(UP|UPZ|NERF|NERFZ|TIEM|TIEMZ|TIEMZD|OVAR|OVARZ|MODZ)\>" ## ## condixonal operatorz. color brightgreen "\<(BIGR THAN|SMALR THAN|LIEK|NOT|AND|OR|XOR|\!|\~|\&\&)|\|\||\||\^)\>" ## ## 4fun color red "\<(PRON)\>" ## ## varabal related color brightyellow "\<(BYES|DIAF|GIMMEH|OUTTA|I HAS A|ITZ|IN MAH|LOL|R|VISIBLE|INVISIBLE)\>" ## ## l00p color brightyellow "\<(IM IN YR|IZ|YARLY|NOWAI|KTHX|WTF|OIC)\>" ## ## added the keywords for dealing with file. ## sorry for the "low lol lolcode" <-- say it again :D color brightyellow "\<(CLOZ|OPEN|REED|RIT)\>" ## ## loops' stuff. added the keywords for try/exepshun color magenta "\<(GTFO|PLZ|AWSUM THX|O NOES)\>" ## ## begin and end lolcode color brightcyan "^[[:space:]]*(HAI|CAN HAS|KTHXBYE|)" ## ## not sure what it does, leave it #color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" ## ## String highlighting. You will in general want your comments and ## strings to come last, because syntax highlighting rules will be ## applied in the order they are read in. <-- said the previous c/c++ s.h. writer color brightwhite "<[^= ]*>" ""(\\.|[^"])*"" ## ## This string is VERY resource intensive! <-- omg! let's use it :D color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" ## ## Comment highlighting color brightblue "BTW.*" color cyan start="OBTW" end="TLDR"
Syntax Highlighting with nano – nanorc for log-stuff
## to have logs interpreted for you in just about 1000 ways use log analyzers ## this only helps in viewing them directly syntax "logs" "midentd.log$" "mldonkey.log$" color brightwhite "[0-9]" color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]" color blue "[0-9][0-9][0-9][0-9]" color cyan "\].*$" color brightblack start="\[" end="\]" syntax "emergelog" "emerge.log$" color brightwhite "[0-9]" color yellow ">>>.*$" color cyan "\*\*\*.*$" color magenta "\:\:\:.*$" color green start="\(" end="\)" color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]" color blue "[0-9][0-9][0-9][0-9]" icolor red "^[[:space:]]*[.0-9A-Z_]*:" syntax "ntplog" "ntp.log$" icolor red "^[[:space:]]*[.0-9A-Z_]*:" color brightwhite "[0-9]" color brightblue "[0-9][0-9]\:[0-9][0-9]\:[0-9][0-9]" color cyan "\].*$" color brightblack start="\[" end="\]" syntax "cronlog" "cron.log$" color cyan "/.*$" color brightblue "[0-9][0-9]\-[.A-Z_]*\-[0-9][0-9]" color brightwhite "[0-9][0-9]\:[0-9][0-9]" color magenta "(FILE|USER)" color yellow "(pid|cmd)" syntax "miniserv" "miniserv.log$" "miniserv.error$" color cyan "Bad\ Request.*$" color brightred "Access\ denied.*$" color brightwhite "[0-9]" color green "(POST|GET|HTTP)" color brightred "\"" color yellow "(\:|\+|/|\.|\-)" color green ".*started$"
Syntax Highlighting with nano – nanorc for javascript
syntax "JavaScript" "\.(js)$" # Default color white "^.+$" # Decimal, octal and hexadecimal numbers color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>" # Floating point number with at least one digit before decimal point color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?" color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?" # Keywords color green "\<(break|case|catch|continue|default|delete|do|else|finally)\>" color green "\<(for|function|if|in|instanceof|new|null|return|switch)\>" color green "\<(switch|this|throw|try|typeof|undefined|var|void|while|with)\>" # Type specifiers color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>" color red "\<(Number|Object|RegExp|String)\>" color red "\<(true|false)\>" # String color brightyellow "L?\"(\\"|[^"])*\"" color brightyellow "L?'(\'|[^'])*'" # Escapes color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]" # Comments color magenta start="/\*" end="\*/" color magenta "//.*$"
Syntax Highlighting with nano – nanorc for java
## Here is an example for Java. ## syntax "java" "\.java$" color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" color red ""[^"]*"" color yellow "\<(true|false|null)\>" color blue "//.*" color blue start="/\*" end="\*/" color brightblue start="/\*\*" end="\*/" color ,green "[[:space:]]+$"
Syntax Highlighting with nano – nanorc for initscript
## initscripts syntax (stolen from gentoo.nanorc) ;) ## syntax "initscript" "/etc/init.d/(\.|/|)" ## All the standard portage functions #color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" ## Highlight bash related syntax color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" color green "-(e|d|f|r|g|u|w|x|L)\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" ## Highlight variables ... official portage ones in red, all others in bright red color brightred "\$\{?[a-zA-Z_0-9]+\}?" color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>" color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>" ## Highlight portage commands color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*" color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|patch)\>" color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>" color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>" color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>" ## Highlight common commands used in ebuilds color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>" ## Highlight comments (doesnt work that well) color yellow "#.*$" ## Highlight strings (doesnt work that well) color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
Syntax Highlighting with nano – nanorc for initng
## InitNG syntax ## syntax "initngscripts" "\.i$" icolor brightgreen "^[0-9A-Z_]+\(\)" color magenta "(daemon|virtual)" color brightwhite "virtual/.*$" color brightblack "daemon/.*$" color yellow "(need|use|respawn|exec\ daemon|also_stop)" color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" color green "-[Ldefgruwx]\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" color cyan "(^|[[:space:]])#.*$" color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" syntax "initng-settings" "system.virtual$" "\.runlevel$" color magenta "daemon" color cyan "system" color blue "net" color red "debug"
Syntax Highlighting with nano – nanorc for ini
# ini highlighting syntax "ini" "\.ini(\.old|~)?$" # values color brightred "=.*$" # equal sign color green "=" # numbers color brightblue "-?[0-9\.]+\s*($|;)" # ON/OFF color brightmagenta "ON|OFF|On|Off|on|off\s*($|;)" # sections color brightcyan "^\s*\[.*\]" # keys color cyan "^\s*[a-zA-Z0-9_\.]+" # comments color brightyellow ";.*$"
Syntax Highlighting with nano – nanorc for info
## *.Info file syntax ## syntax "info" "Info.txt$" color green "[0-9]" color brightblue "\<(video|codec|bitrate|width|height|General|FileSize|Format|OveralBitRate|PlayTime)\>" color brightblue "\<(Video|Codec|Bitrate|BitRate|Width|Height|AspectRatio|FrameRate|Bits|SamplingRate)\>" color brightblue "\<(audio|channel|V(i|I)DEO|CODEC|FORMAT|B(I|i)TRATE|METHOD|R(I|i)P|AUD(I|i)O|RESOLUT(I|i)ON|GENRE)\>" color brightblue "\<(Audio|Channel|Sound|ASPECT|RAT(i|I)O|MOV(I|i)E|S(i|I)ZE|RUNT(I|i)ME)\>" color magenta "Movie.*$" color blue "\<(KHz|kHz|Kbps|fps|MB|KB|channels|MiB|min|kbit\/s|Min)\>" color brightyellow "\<(DivX|XviD|MPEG\-4|AAC\ LC|H\.264|LAME|NTSC|MPEG1|AVI)\>" color brightblack "\=" icolor brightcyan "[.0-9A-Z_]*:" icolor brightyellow "http:.*$"
Syntax Highlighting with nano – nanorc for http
############################################################################## # # Syntax highlighting for HTTP codes # # Author: Josef 'Jupp' Schugt, jupp(a)rubyforge.org # License: GPL 2 or later # # Version: 2004-02-25 # ############################################################################## syntax "urls" color brightmagenta "^.*$" color cyan "^(1[0-9][0-9]|20[256]|30[45]).*$" color green "^20[03].*$" color brightyellow "^(201|30[0-37]).*$" color brightred "^(204|[45][0-9][0-9]|666).*$"