diff options
Diffstat (limited to 'doc/syntax')
-rw-r--r-- | doc/syntax/Makefile.in | 2 | ||||
-rw-r--r-- | doc/syntax/go.nanorc | 3 | ||||
-rw-r--r-- | doc/syntax/java.nanorc | 3 | ||||
-rw-r--r-- | doc/syntax/lua.nanorc | 8 | ||||
-rw-r--r-- | doc/syntax/nanorc.nanorc | 6 | ||||
-rw-r--r-- | doc/syntax/perl.nanorc | 2 | ||||
-rw-r--r-- | doc/syntax/python.nanorc | 5 | ||||
-rw-r--r-- | doc/syntax/ruby.nanorc | 7 | ||||
-rw-r--r-- | doc/syntax/sh.nanorc | 2 | ||||
-rw-r--r-- | doc/syntax/spec.nanorc | 4 |
10 files changed, 25 insertions, 17 deletions
diff --git a/doc/syntax/Makefile.in b/doc/syntax/Makefile.in index c61d0134..f86e5043 100644 --- a/doc/syntax/Makefile.in +++ b/doc/syntax/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff --git a/doc/syntax/go.nanorc b/doc/syntax/go.nanorc index 58ef1812..0b623347 100644 --- a/doc/syntax/go.nanorc +++ b/doc/syntax/go.nanorc @@ -40,3 +40,6 @@ color brightblue start="/\*" end="\*/" # Trailing whitespace. color ,green "[[:space:]]+$" + +# Set up the formatter since spelling is probably useless... +formatter gofmt -w diff --git a/doc/syntax/java.nanorc b/doc/syntax/java.nanorc index 0beebf47..829c8afa 100644 --- a/doc/syntax/java.nanorc +++ b/doc/syntax/java.nanorc @@ -5,7 +5,8 @@ magic "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 cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native)\>" +color cyan "\<(package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" color red ""[^"]*"" color yellow "\<(true|false|null)\>" color blue "//.*" diff --git a/doc/syntax/lua.nanorc b/doc/syntax/lua.nanorc index 7512f53c..3dbbea8d 100644 --- a/doc/syntax/lua.nanorc +++ b/doc/syntax/lua.nanorc @@ -15,18 +15,20 @@ color brightyellow ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.|\<(not|and|or)\>" color brightblue "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>" # Keywords -color brightyellow "\<(debug|string|math|table|io|coroutine|os)\>\." +color brightyellow "\<(io|math|os|string|table|coroutine|debug)\>\." color brightyellow "\<(_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\(" # Standard library color brightyellow "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write|stdin|stdout|stderr)\>" -color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|mod|modf|pi|pow|rad|random|randomseed|sinh|tan)\>" +color brightyellow "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log)\>" +color brightyellow "math\.\<(max|min|mod|modf|pi|pow|rad|random|randomseed|sinh|tan)\>" color brightyellow "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>" color brightyellow "package\.\<(cpath|loaded|loadlib|path|preload|seeall)\>" color brightyellow "string\.\<(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)\>" color brightyellow "table\.\<(concat|insert|maxn|remove|sort)\>" color brightyellow "coroutine\.\<(create|resume|running|status|wrap|yield)\>" -color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>" +color brightyellow "debug\.\<(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue)\>" +color brightyellow "debug\.\<(setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)\>" # File handle methods color brightyellow "\:\<(close|flush|lines|read|seek|setvbuf|write)\>" diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc index fd66d6bc..1858f2b0 100644 --- a/doc/syntax/nanorc.nanorc +++ b/doc/syntax/nanorc.nanorc @@ -6,12 +6,12 @@ syntax "nanorc" "\.?nanorc$" icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|i?color|extendsyntax).*$" # Keywords -icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|poslog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|undo|view|wordbounds)\>" -icolor yellow "^[[:space:]]*set[[:space:]]+(functioncolor|keycolor||statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" +icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|poslog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|view|wordbounds)\>" +icolor yellow "^[[:space:]]*set[[:space:]]+(functioncolor|keycolor|statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+" icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$" icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]*$" -icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter)[[:space:]]+.*$" +icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter|formatter)[[:space:]]+.*$" icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|extendsyntax)\>" # Colors diff --git a/doc/syntax/perl.nanorc b/doc/syntax/perl.nanorc index 5f39c176..6a70d3d1 100644 --- a/doc/syntax/perl.nanorc +++ b/doc/syntax/perl.nanorc @@ -1,7 +1,7 @@ ## Here is an example for Perl. syntax "perl" "\.p[lm]$" -header "^#!.*/perl[-0-9._]*" +header "^#!.*perl[-0-9._]*" magic "Perl script text" 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)\>" diff --git a/doc/syntax/python.nanorc b/doc/syntax/python.nanorc index 4679cf10..de876bdb 100644 --- a/doc/syntax/python.nanorc +++ b/doc/syntax/python.nanorc @@ -1,12 +1,13 @@ ## Here is an example for Python. syntax "python" "\.py$" -header "^#!.*/python[-0-9._]*" +header "^#!.*python[-0-9._]*" # Function definitions. icolor brightblue "def [0-9A-Z_]+" # Keywords. -color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>" +color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from)\>" +color brightcyan "\<(global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>" # Strings. color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" diff --git a/doc/syntax/ruby.nanorc b/doc/syntax/ruby.nanorc index 3566e1fe..298425f0 100644 --- a/doc/syntax/ruby.nanorc +++ b/doc/syntax/ruby.nanorc @@ -1,10 +1,11 @@ ## Here is an example for Ruby. syntax "ruby" "\.rb$" -header "^#!.*/ruby[-0-9._]*" +header "^#!.*ruby[-0-9._]*" -# Asciibetical list of reserved words. -color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>" +# Reserved words. +color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module)\>" +color yellow "\<(next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>" # Constants. color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*" # Ruby "symbols". diff --git a/doc/syntax/sh.nanorc b/doc/syntax/sh.nanorc index 823cc5d1..074e03ac 100644 --- a/doc/syntax/sh.nanorc +++ b/doc/syntax/sh.nanorc @@ -1,7 +1,7 @@ ## Here is an example for Bourne shell scripts. syntax "sh" "\.sh$" -header "^#!.*/(ba|k|pdk)?sh[-0-9_]*" +header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)" magic "(POSIX|Bourne.*) shell script text" icolor brightgreen "^[0-9A-Z_]+\(\)" diff --git a/doc/syntax/spec.nanorc b/doc/syntax/spec.nanorc index a0fff88a..47de211a 100644 --- a/doc/syntax/spec.nanorc +++ b/doc/syntax/spec.nanorc @@ -24,8 +24,8 @@ color yellow start="%__" end="\ " color magenta start="%\{" end="\}" color yellow start="%\{__" end="\}" # Sections. -color red "^%(build$|changelog|check$|clean$|description|files|install$|package|pre|prep$|preun|post|postun)" -color red "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)" +color red "^%(build$|changelog|check$|clean$|description|files|install$|package|pre|prep$|pretrans|preun)" +color red "^%(post|posttrans|postun|trigger|triggerin|triggerpostun|triggerun|verifyscript)" # Conditionals and defines. color brightred "%(if|else|endif|define|global|undefine)" |