diff --git a/syntax/asm.nanorc b/syntax/asm.nanorc index 228a185f..35859eec 100644 --- a/syntax/asm.nanorc +++ b/syntax/asm.nanorc @@ -1,7 +1,7 @@ ## Here is an example for assembler. syntax "asm" "\.(S|s|asm)$" -magic "[Aa]ssembl(y|er)" +magic "assembler source" comment "//" color red "\<[A-Z_]{2,}\>" diff --git a/syntax/awk.nanorc b/syntax/awk.nanorc index 34e7176f..7d3dff3b 100644 --- a/syntax/awk.nanorc +++ b/syntax/awk.nanorc @@ -1,7 +1,7 @@ ## Here is an example for awk. syntax "awk" "\.awk$" -magic "awk.*script text" +magic "awk script" comment "#" # Records. diff --git a/syntax/c.nanorc b/syntax/c.nanorc index fa97dc70..1b782844 100644 --- a/syntax/c.nanorc +++ b/syntax/c.nanorc @@ -1,7 +1,7 @@ ## Here is an example for C/C++. syntax "c" "\.(c(c|pp|xx|\+\+)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" -magic "(ASCII|UTF-8 Unicode) C(\+\+)? program text" +magic "^(C|C\+\+) (source|program)" comment "//" # Constants. diff --git a/syntax/elisp.nanorc b/syntax/elisp.nanorc index 785827ee..296ff49d 100644 --- a/syntax/elisp.nanorc +++ b/syntax/elisp.nanorc @@ -1,6 +1,7 @@ ## Here is an example for Emacs Lisp. syntax "elisp" "\.el$" +magic "Lisp/Scheme program" comment ";" # Basic functions/macros diff --git a/syntax/guile.nanorc b/syntax/guile.nanorc index 1f93a7c0..db5f786b 100644 --- a/syntax/guile.nanorc +++ b/syntax/guile.nanorc @@ -2,7 +2,6 @@ syntax "guile" "\.scm$" header "^#!.*guile" -magic "guile" comment ";" # Basic scheme functions diff --git a/syntax/html.nanorc b/syntax/html.nanorc index 63d0476b..f8da6990 100644 --- a/syntax/html.nanorc +++ b/syntax/html.nanorc @@ -1,7 +1,7 @@ ## Here is an example for HTML. syntax "html" "\.html?$" -magic "HTML document text" +magic "HTML document" comment "" # Tags: diff --git a/syntax/lua.nanorc b/syntax/lua.nanorc index 70f69d47..90e9ea22 100644 --- a/syntax/lua.nanorc +++ b/syntax/lua.nanorc @@ -5,6 +5,7 @@ ## Version: 2011-05-05 syntax "lua" "\.lua$" +magic "Lua script" comment "--" color brightwhite "\[\[.*\]\]" diff --git a/syntax/makefile.nanorc b/syntax/makefile.nanorc index 71f39f03..e94a2499 100644 --- a/syntax/makefile.nanorc +++ b/syntax/makefile.nanorc @@ -1,6 +1,7 @@ ## Here is an example for Makefiles. syntax "makefile" "Makefile[^/]*$" "\.(make|mk)$" +magic "makefile script" comment "#" color red "[:=]" diff --git a/syntax/man.nanorc b/syntax/man.nanorc index dd7d23ea..00d8fe92 100644 --- a/syntax/man.nanorc +++ b/syntax/man.nanorc @@ -1,7 +1,7 @@ ## Here is an example for manpages. syntax "man" "\.[1-9]x?$" -magic "troff or preprocessor input text" +magic "troff or preprocessor input" comment ".\"" color green "\.(SH|SS|TH) .*$" diff --git a/syntax/objc.nanorc b/syntax/objc.nanorc index 5a14ada3..ff5ea40f 100644 --- a/syntax/objc.nanorc +++ b/syntax/objc.nanorc @@ -1,6 +1,7 @@ ## Here is an example for C/C++/Obj-C. syntax "m" "\.m$" +magic "Objective-C source" comment "//" # Stuffs, diff --git a/syntax/ocaml.nanorc b/syntax/ocaml.nanorc index b2b3aa0f..73d6e065 100644 --- a/syntax/ocaml.nanorc +++ b/syntax/ocaml.nanorc @@ -1,6 +1,7 @@ ## Syntax highlighting for OCaml. syntax "ocaml" "\.mli?$" +magic "OCaml" comment "(*|*)" # Uid: diff --git a/syntax/patch.nanorc b/syntax/patch.nanorc index 14460e78..5bf2a399 100644 --- a/syntax/patch.nanorc +++ b/syntax/patch.nanorc @@ -1,7 +1,7 @@ ## Here is an example for patch files. syntax "patch" "\.(patch|diff|debdiff)$" -magic "diff output text" +magic "diff output" # There is no official support for comments in patch files. comment "" diff --git a/syntax/perl.nanorc b/syntax/perl.nanorc index 97ab68ac..beb9b079 100644 --- a/syntax/perl.nanorc +++ b/syntax/perl.nanorc @@ -2,7 +2,7 @@ syntax "perl" "\.p[lm]$" header "^#!.*perl[-0-9._]*" -magic "Perl script text" +magic "Perl script" comment "#" 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/syntax/php.nanorc b/syntax/php.nanorc index 37d09780..2b5f0776 100644 --- a/syntax/php.nanorc +++ b/syntax/php.nanorc @@ -1,7 +1,7 @@ ## Here is an example for PHP. syntax "php" "\.ph(p[23457s~]?|tml)$" -magic "PHP script text" +magic "PHP script" comment "//" # PHP markings. diff --git a/syntax/postgresql.nanorc b/syntax/postgresql.nanorc index 6dd471d1..12d4483f 100644 --- a/syntax/postgresql.nanorc +++ b/syntax/postgresql.nanorc @@ -1,7 +1,6 @@ ## Here is an example for PostgreSQL. syntax "sql" "\.sql[2345s~]?$" -magic "PostgreSQL script text" comment "-- " # Functions. diff --git a/syntax/python.nanorc b/syntax/python.nanorc index 912c17d1..29d2dff4 100644 --- a/syntax/python.nanorc +++ b/syntax/python.nanorc @@ -2,6 +2,7 @@ syntax "python" "\.py$" header "^#!.*python[-0-9._]*" +magic "Python script" linter pyflakes comment "#" diff --git a/syntax/ruby.nanorc b/syntax/ruby.nanorc index 0c5abce9..7fd1e3b7 100644 --- a/syntax/ruby.nanorc +++ b/syntax/ruby.nanorc @@ -2,6 +2,7 @@ syntax "ruby" "\.rb$" header "^#!.*ruby[-0-9._]*" +magic "Ruby script" linter ruby -w -c comment "#" diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc index 17e6dd9d..406e332c 100644 --- a/syntax/sh.nanorc +++ b/syntax/sh.nanorc @@ -2,7 +2,7 @@ syntax "sh" "\.sh$" header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)" -magic "(POSIX|Bourne.*) shell script text" +magic "(POSIX|Bourne-Again) shell script.*text" linter dash -n comment "#" diff --git a/syntax/tcl.nanorc b/syntax/tcl.nanorc index adbb6059..363b53e2 100644 --- a/syntax/tcl.nanorc +++ b/syntax/tcl.nanorc @@ -1,6 +1,7 @@ ## Syntax highlighting for Tcl files. syntax "tcl" "\.tcl$" +magic "Tcl(/Tk)? script" comment "#" # Standard Tcl [info commands]: diff --git a/syntax/tex.nanorc b/syntax/tex.nanorc index 6f2d7ab5..7dcb3836 100644 --- a/syntax/tex.nanorc +++ b/syntax/tex.nanorc @@ -1,6 +1,7 @@ ## Here is a short example for TeX files. syntax "tex" "\.tex$" +magic "(La)?TeX document" linter chktex -v0 -q -I comment "%" diff --git a/syntax/texinfo.nanorc b/syntax/texinfo.nanorc index 3c9f8df7..3125d254 100644 --- a/syntax/texinfo.nanorc +++ b/syntax/texinfo.nanorc @@ -2,7 +2,7 @@ syntax "texinfo" "\.texi$" header "^\\input texinfo" -magic "Texinfo source text" +magic "Texinfo source" comment "@c " # Command arguments, trailing and enclosed. diff --git a/syntax/xml.nanorc b/syntax/xml.nanorc index 41c422fa..084618ab 100644 --- a/syntax/xml.nanorc +++ b/syntax/xml.nanorc @@ -2,7 +2,7 @@ syntax "xml" "\.([jrsx]html?|jnlp|mml|pom|rng|sgml?|svg|w[as]dl|wsdd|xjb|xml|xs(d|lt?)|xul)$" header "<\?xml.*version=.*\?>" -magic "(XML|SGML) (sub)?document text" +magic "(XML|SGML) (sub)?document" comment "" # The entire content of the tag: