## *.po file syntax ## syntax "po" "\.po$" "\.pot$" color brightblue "\<(msgid|msgstr)\>" color brightred "\/" color green "#.*$" color red "\<fuzzy\>" color yellow "\<c-format\>" color yellow "\"" color red "\"\"" color brightyellow "\"\\n\"" color brightmagenta "\<(Project\-Id\-Version|Report\-Msgid\-Bugs\-To|Last\-Translator|Language\-Team|charset)\>" color cyan "\<(POT\-Creation\-Date|PO\-Revision\-Date|MIME\-Version|Content\-Type|Content\-Transfer\-Encoding)\>" color yellow "\<(Copyright|(C))\>" color yellow "[0-9]" color brightyellow "\<(UTF|ISO|Windows|Mac|IBM)\>\-[0-9]" color red "#~.*$"
Tag: Syntax
Syntax Highlighting with nano – nanorc for php2
# PHP Syntax Highlighting syntax "php2" "\.php[2345s~]?$" color brightblue "(.*)\(" color blue "\$[a-zA-Z_0-9$]*|[=!<>]" color green "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s" color green "[.,{}();]" color red "('.*')|(\".*\")" color brightyellow "(#.*|//.*)$" color brightyellow start="/\*" end="\*/" color brightblue "(<\?(php)?|\?>)" color white start="\?>" end="<\?(php)?"
Syntax Highlighting with nano – nanorc for php
#################### #php syntax ## PHP syntax highlighting ## syntax "php" "\.php$" "\.php[2345s]$" "\.phtml$" #functions color brightmagenta "([A-Za-z0-9])" #numbers color brightblue "[0-9]" #special color brightwhite "(^|[^A-Za-z0-9])(<\?php|\?>|var|and|or|default|class|extends|true|false|global|function|new|switch|case|b$ #types color brightred "([^A-Za-z0-9])|[^A-Za-z](null|int|string|float|bool|object|resource)[^A-Za-z0-9_]+[^A-Za-z]" #strings color brightyellow ""(\\.|[^\"])*"" color brightyellow "'(\\.|[^\'])*'" #Variables color brightcyan "\$[]\[A-Za-z0-9_'\"]*" #comments color green "//.*" color green "#.*" color green start="/\*" end="\*/"
Syntax Highlighting with nano – nanorc for perl
## Here is an example for Perl. ## syntax "perl" "\.p[lm]$" color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>" color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>" icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)" color yellow "".*"|qq\|.*\|" color white "[sm]/.*/" color white start="(^use| = new)" end=";" color green "#.*" color yellow start="<< 'STOP'" end="STOP"
Syntax Highlighting with nano – nanorc for others
syntax "makefile" "(m|M)akefile$" "\.mak$" icolor yellow start="^[[:space:]]*[.0-9A-Z_]" end="\=[[:space:]]|\:|\:\:|\/" color brightgreen "((C|CXX|LD)FLAGS)|LIBADD|LIBS|include" icolor cyan start="\{" end="\}" icolor cyan start="\(" end="\)" color brightyellow "\$" color green "#.*$" syntax "infile" ".in$" ".am$" icolor brightgreen start="\{" end="\}" color magenta "(if[[:space:]]|endif|else)" color yellow "^[[:space:]]*[.0-9A-Z_](\\.|[^\"])*(\=|\:)" color cyan "\((\\.|[^\"])*\)" color cyan "@(\\.|[^\"])*@" color brightblack "(\-[.a-z]*|\HAVE[.a-zA-Z_]*)" color yellow "\/" color brightblue ""(\\.|[^\"])*"" color brightyellow "(\$|dnl.*$)" color green "#.*$" syntax "spec" ".spec$" color brightwhite "[0-9]" color cyan "stub" color yellow "pascal|stdcall|varargs|cdecl" color brightyellow "\((\\.|[^\"])*\)" color brightgreen "\@" color green "#.*$" syntax "configurelog" "config.log$" color cyan "(\:.*$|\=.*$)" color yellow ""(\\.|[^\"])*"" color magenta "[.0-9A-Z_a-z]*:" color yellow "[.A-Z_a-z]*:[0-9]*:" color cyan start="\/\*" end="\*\/" color brightgreen "[[:space:]]yes" color brightred "[[:space:]]no" color green "#.*$" color brightgreen "\|.*$" syntax "texi" ".texi$" color brightcyan "\((\\.|[^\"])*\)" color yellow "(\{|\})" color brightblue "\$" color brightblack "\[(\\.|[^\"])*\]" color brightyellow "@[.a-zA-Z_]*" color cyan "^[[:space:]]*[.a-zA-Z_]*\:" color brightred "@c[.a-zA-Z_]*" color green "#.*$" syntax "desktop" "\.desktop$" color brightblue "\[(\\.|[^\"])*\]" color yellow "=.*$" color brightgreen "\=" syntax "lua" "\.lua$" color brightwhite "[0-9]" color cyan "local.*$" color brightblack "\{|\}" color brightgreen "\=" color red "\[|\]" color yellow "\"(\\.|[^\"])*\"" color green "\-\-.*$" syntax "m3u" "\.m3u$" color green "#.*$" color brightgreen "http.*$" color yellow "\/" color cyan "[.0-9a-zA-Z_-]*\.mp3" syntax "bat" "\.bat$" color yellow "%(\\.|[^\"])*%" color brightyellow "set[[:space:]]" color brightgreen "\=" color green "REM.*$" syntax "authors" "AUTHORS$" color brightgreen "((T|t)ranslators|(D|d)ocumenters|(A|a)uthors|(C|c)ontributors)" color brightyellow "<(\\.|[^\"])*>" color yellow "\@" color cyan "\*.*$" color brightcyan "\:" color brightblue "\((\\.|[^\"])*\)" color green "#.*$" syntax "kconfig" "Kconfig$" "Kconfig.(cpu|debug)$" color brightyellow "(<(\\.|[^\"])*>|\!)" color brightyellow "\((\\.|[^\"])*\)" color blue "source.*$" color brightgreen "(ult[[:space:]]y|\"(\\.|[^\"])*\")" color brightblue "ult[[:space:]]m" color brightred "ult[[:space:]]n" color magenta "default" color cyan "config.*$" color yellow "config|menu|(main|end)menu|choice|endchoice" color brightcyan "(^[[:space:]](bool|def_bool|tristate|depends[[:space:]]on|select|prompt|range|help|string|int|hex))" color brightmagenta "(\||\&)" color brightred "\"off\"" color green "#.*$" syntax "la_file" "\.la$" icolor yellow "^[[:space:]]*[.0-9A-Z_]*=" color white "\=" color brightgreen "yes" color brightred "no" color brightwhite "[0-9]" color brightyellow "'(\\.|[^\"])*'" color green "#.*$"
Syntax Highlighting with nano – nanorc for patch
## Here is an example for patch files. ## syntax "patch" "\.(patch|diff)$" color brightgreen "^\+.*" color green "^\+\+\+.*" color brightblue "^ .*" color brightred "^-.*" color red "^---.*" color brightyellow "^@@.*" color magenta "^diff.*"
Syntax Highlighting with nano – nanorc for passwd
### etc/passwd syntax "passwd" "(\.|/|)passwd$" "(\.|/|)shadow$" color white ".*$" color blue "\:.*$" color yellow "\:*\:" color cyan "/.*$" color red "/bin/false" color brightred "root" color brightgreen "/bin/.*sh" color white "[0-9]" color magenta "\:\/.*\:"
Syntax Highlighting with nano – nanorc for ocaml
# OCaml sample nanorc # syntax "ocaml" "\.mli?$" #uid color red "\<[A-Z][0-9a-z_]{2,}\>" #declarations color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>" #structure items color red "\<(type|open|class|module|exception|external)\>" #patterns color blue "\<(fun|function|functor|match|try|with)\>" #patterns-modifiers color yellow "\<(as|when|of)\>" #conditions color cyan "\<(if|then|else)\>" #blocs color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>" #constantes color green "\<(true|false)\>" #modules/classes color green "\<(include|inherit|initializer)\>" #expr modifiers color yellow "\<(new|ref|mutable|lazy|assert|raise)\>" #comments color white start="\(\*" end="\*\)" #strings (no multiline handling yet) color brightblack ""[^\"]*""
Syntax Highlighting with nano – nanorc for objc
## Here is an example for C/C++/Obj-C. ## syntax "m" "\.m$" ## Stuffs color brightwhite "\<[A-Z_][0-9A-Z_]+\>" color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" color green "\<[[:alpha:]_][[:alnum:]_]*_t\>" color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" color brightgreen "\<(for|if|while|do|else|case|default|switch)\>" color brightgreen "\<(try|throw|catch|operator|new|delete)\>" color brightgreen "\<(goto|continue|break|return)\>" color brightgreen "@\<(en(code|d)|i(mplementation|nterface)|selector)\>" ## ## GCC builtins color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" ## Selector/method color brightmagenta "(^|[[:space:]])\[.*[[:space:]].*\]" color white ":[[:alnum:]]*" color magenta "[[:alnum:]]*:" color white "\[[^][:space:]]*\]" ## ## 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. color brightblack "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" color brightblack "<[^= ]*>" ""(\\.|[^"])*"" color brightblue "@"(\\.|[^"])*"" ## ## This string is VERY resource intensive! ## color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" color brightblue "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)" ## Comment highlighting color yellow "//.*" color yellow start="/\*" end="\*/"
Syntax Highlighting with nano – nanorc for nscd
syntax "nscd" "nscd.conf$" color cyan "(passwd|group|hosts)" color yellow "([0-9]|yes)" color green "#.*$"