datarot / nanosyntax Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/nanosyntax
Automatically exported from code.google.com/p/nanosyntax
What steps will reproduce the problem?
1. copy nanorc config of tcl to ~/.nanorc
2. run nano file.tcl
3.
What is the expected output? What do you see instead?
nano should open without error, but its having error loading
What version of the product are you using? On what operating system?
nano 1.2.1
Please provide any additional information below.
i edited colors of the tcl nanorc, think it look good, please use it if its
fine:
++++++++++++++++++++++++++++++++++++++++++++++++++++
syntax "\.tcl$"
## Standard Tcl [info commands]
color green
"\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qu
alify|binary|break|case|catch|cd|clock|close|concat|continue|encoding|eof|error|
eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|f
ormat|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|l
ist|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|p
uts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|strin
g|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variabl
e|vwait|while)\>"
## Basic Tcl sub commands.
color green "\<(array anymore|array donesearch|array exists|array get|array
names|array nextelement|array set|array size|array startsearch|array
statistics|array unset)\>"
color green "\<(string bytelength|string compare|string equal|string
first|string index|string is|string last|string length|string map|string
match|string range|string repeat|string replace|string to|string tolower|string
totitle|string toupper|string trim|string trimleft|string trimright|string
will|string wordend|string wordstart)\>"
## Extended TclX [info commands]
color green
"\<(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal
|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|cto
ken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|i
nfox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lm
atch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random
|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_cr
eate|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep
|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\>"
## Syntax.
color blue "proc[[:space:]]" "(\{|\})"
color cyan "(\(|\)|\;|`|\\|\$|<|>|!|=|&|\|)"
color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color red "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color brightgreen "[[:space:]]+$"
color magenta "^([[:space:]]+|)#.*"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Original issue reported on code.google.com by [email protected]
on 2 Jun 2011 at 8:19
I've been tweaking the PHP configuration and this is what I've got.
Its a lot less.. EXTREME than the other issue raised for it, but it is
definitely a lot more context aware.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2010 at 7:37
Nano doesn't want work with etcportage.nanorc properly
In the attach patch for solve this problem :)
Original issue reported on code.google.com by [email protected]
on 9 Jul 2009 at 1:43
Attachments:
Batch files are not case-sensitive so I changed "REM" to "(R|r)(E|e)(M|m)" and
"set" to "(s|S)(e|E)(t|T)".
Original issue reported on code.google.com by [email protected]
on 16 Jul 2015 at 12:33
Attachments:
Added support for "crontab -e"
Original issue reported on code.google.com by [email protected]
on 11 Dec 2012 at 11:44
Attachments:
When I include php.nanorc to /etc/nanorc nano not working and return error:
Segmentation fault
Original issue reported on code.google.com by [email protected]
on 30 May 2012 at 8:52
Added HTML, css, and substrings to the bottom to show further formatting inside
the strings
Original issue reported on code.google.com by [email protected]
on 14 Sep 2011 at 9:10
Attachments:
The term "set" is repeated (in two different colors). I removed it from one
of them. I also added unset as something to be highlighted.
--- bash.nanorc 2009-12-28 13:01:06.000000000 +0200
+++ newbash.nanorc 2009-12-28 13:02:13.000000000 +0200
@@ -11,3 +11,3 @@
# Control
-color magenta
"\<(if|else|for|function|case|esac|in|select|until|while|do|elif|then|set|\.|don
e|fi)\>"
+color magenta
"\<(if|else|for|function|case|esac|in|select|until|while|do|elif|then|\.|done|fi
)\>"
@@ -18,3 +18,3 @@
# Builtins
-color red
"\<(source|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs
|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let
|logout|popd|printf|pushd|pwd|return|set|shift|shopt|suspend|test|times|trap|typ
e|ulimit|umask|unalias|wait)\>"
+color red
"\<(source|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs
|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let
|logout|popd|printf|pushd|pwd|return|(un)?set|shift|shopt|suspend|test|times|tra
p|type|ulimit|umask|unalias|wait)\>"
Original issue reported on code.google.com by [email protected]
on 28 Dec 2009 at 11:03
What steps will reproduce the problem?
1. use this nanorc syntax as is on MacosX
What is the expected output? What do you see instead?
nano throws an exception when parsing the syntax file : "repetition-operator
operand invalid" (line 26)
What version of the product are you using? On what operating system?
Please provide any additional information below.
fix :
line 26 : replace c++ flex++ g++
with c\+\+ flex\+\+ g\+\+
Original issue reported on code.google.com by [email protected]
on 26 Sep 2010 at 2:40
I found the php.nanorc's out there lacking, so here's mine. Still working
on it but it's fairly good for daily use, at least for me.
Thanks.
BEGIN--------------------
syntax "php" "\.php[2345s~]?$"
## HTML (assume everything is HTML until proven otherwise)
color white,blue "^.+$"
## PHP
color white,black start="<\?php" end="\?>"
## strings, part 1
#malformed
color magenta,yellow "('|")"
#override not malformed
color brightmagenta start="['"]" end="[^\\]['"]"
## functions
icolor white start="[a-z_0-9]+\(" end=")[\);,$]*"
## variables
icolor brightred "\$[a-z_0-9]+"
color brightred start="\$\{" end="\}"
## types
color green "([^\$]|^)\<(var|float|global|double|bool|char|int|enum|const)\>"
## constants (assume constants are ALL_CAPS)
color red "\<[A-Z_0-9]*\>"
## numbers
#decimal
color yellow "\<\-?[0-9\.]+\>"
#hex
icolor yellow,blue "\<0x[0-9a-f]+\>"
#octal
color yellow,green "\<0[0-7]+\>"
#boolean
icolor cyan "([^\$]|^)\<(true|false)\>"
## structure
#note, $class is a variable, class is not.
color brightyellow
"([^\$]|^)\<(class|new|private|public|function|for|foreach|if|while|do|else|else
if|case|default|switch)\>"
## control flow
color brightblue "([^\$]|^)\<(goto|continue|break|return)\>"
## operators
color green
"(\^|\&|\||=|==|===|&&|\|\||\!==?|>|<|\.=?|->|::|\+|\-|\*|\/|\!|\!=|\!==|%=|\*=|
\+=|\-=|\/=)"
## braces
color white "(\{|\(|\)|\})"
##sad wee end brackets etc
color white "^[[:blank:]]*([\)\}][,;]?[[:blank:]]*)*$"
## strings
color brightmagenta "'([^']*\\')*[^']*'"
color brightmagenta ""(\.|[^"])*""
#kind of a hack here since backrefs don't work with start and end apparently
color brightmagenta start="<<<(.*)" end=";$"
## control flow
color brightblue "([^\$]|^)\<(goto|continue|break|return)\>"
# vars in strings
icolor brightred "\$[a-z0-9_]*"
## comments
color blue "[^:]//.*"
color blue "^//.*"
color blue "(^|[^'"]+)#.*"
color blue start="/\*" end="\*/"
##HTML again
color white,blue start="\?>" end="<\?php"
color white,blue start="" end="<\?php"
color white,blue start="\?>" end=".$"
#color brightred,blue "&[^&]"
icolor cyan,blue "&[a-z0-9#]{2,8};"
## Trailing whitespace
color ,white "[[:blank:]]+$"
## php markings
color brightgreen "(<\?(php)?|\?>)"
Original issue reported on code.google.com by [email protected]
on 16 Oct 2009 at 5:16
A significantly better java.nanorc file, in my opinion.
Highlights common classes, the primary common packages, properly handles
strings with escaped quotes, and the common annotations.
Original issue reported on code.google.com by [email protected]
on 15 Aug 2012 at 7:13
Attachments:
replace icolor
Original issue reported on code.google.com by [email protected]
on 28 Dec 2011 at 10:47
Attachments:
Snow Leopard 10.6.7
$ nano --version
GNU nano version 2.0.6 (compiled 11:42:28, May 18 2009)
errors:
------------
Error in /usr/share/nano/syntax-nanorc/aptsrclist.nanorc on line 5: Bad regex
"^deb(-src)? ((http|file|ftp):/[^
]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+ .+$": invalid
character range
Error in /usr/share/nano/syntax-nanorc/aptsrclist.nanorc on line 7: Bad regex
"^deb(-src)? ((http|file|ftp):/[^
]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+": invalid
character range
Error in /usr/share/nano/syntax-nanorc/aptsrclist.nanorc on line 12: Bad regex
"cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/": invalid character range
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/bash.nanorc on line 25: Bad regex
"\<(aclocal|aconnect|aplay|apm|apmsleep|apropos|ar|arecord|as|as86|autoconf|auto
header|automake|awk|basename|bc|bison|c++|cal|cat|cc|cdda2wav|cdparanoia|cdrdao|
cd-read|cdrecord|chfn|chgrp|chmod|chown|chroot|chsh|clear|cmp|co|col|comm|cp|cpi
o|cpp|cut|dc|dd|df|diff|diff3|dir|dircolors|directomatic|dirname|du|env|expr|fbs
et|file|find|flex|flex++|fmt|free|ftp|funzip|fuser|g++|gawk|gc|gcc|gdb|getent|ge
topt|gettext|gettextize|gimp|gimp-remote|gimptool|gmake|gs|head|hexdump|id|insta
ll|join|kill|killall|ld|ld86|ldd|less|lex|ln|locate|lockfile|logname|lp|lpr|ls|l
ynx|m4|make|man|mkdir|mknod|msgfmt|mv|namei|nasm|nawk|nice|nl|nm|nm86|nmap|nohup
|nop|od|passwd|patch|pcregrep|pcretest|perl|perror|pidof|pr|printf|procmail|prun
e|ps2ascii|ps2epsi|ps2frag|ps2pdf|ps2ps|psbook|psmerge|psnup|psresize|psselect|p
stops|rcs|rev|rm|scp|sed|seq|setterm|shred|size|size86|skill|slogin|snice|sort|s
ox|split|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|stat|strings|strip|sudo|su
idperl|sum|tac|tail|tee|test|tr|uniq|unlink|unzip|updatedb|updmap|uptime|users|v
mstat|w|wc|wget|whatis|whereis|which|who|whoami|write|xargs|yacc|yes|zip|zsoelim
)\>": repetition-operator operand invalid
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/changelogs.nanorc on line 11: Bad regex
"\<(CEST|CET|CST||CDT|EDT)\>": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/config.nanorc on line 2: Bad regex
"(\.|/|)config$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/config.nanorc on line 2: Bad regex
"(\.|/|)logout$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/config.nanorc on line 2: Bad regex
"(\.|/|)COLORS$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/config.nanorc on line 2: Bad regex
"(\.|/|)colors$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/config2.nanorc on line 2: Bad regex
"(\.|/|)env$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/config2.nanorc on line 2: Bad regex
"(\.|/|)server.$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/configfiles.nanorc on line 2: Bad regex
"(\.|/|)conf$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/configfiles.nanorc on line 2: Bad regex
"(\.|/|)ample$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/configfiles.nanorc on line 2: Bad regex
"(\.|/|)globals$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/desc.nanorc on line 2: Bad regex
"(\.|/|)desc$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/ebuild.nanorc on line 19: Bad regex
"\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe)\>": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/ebuild.nanorc on line 21: Bad regex
"prepall(|docs|info|man|strip)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/ebuild.nanorc on line 22: Bad regex
"\<(|doc|ins|exe)into\>": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/ekghistory.nanorc on line 1: Bad regex
"(\.|/|).gg/history": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/etc-stuff.nanorc on line 12: Bad regex
"modules.d/(\.|/|)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/etc-stuff.nanorc on line 165: Bad regex
"/etc/ppp/peers/(\.|/|)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/etc-stuff.nanorc on line 201: Bad regex
"sane.d/(\.|/|)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/etc-stuff.nanorc on line 223: Bad regex
"(cdrom|cdrw|dvd|dvdrw|isdn|pty|vcs|vcsa|ippp|dcbri|ircomm|capi|card|nvidia|rtc|
agpgart|psaux|ptmx|sd|dasd|)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/etc-stuff.nanorc on line 276: Bad regex
"xinetd.d/(\.|/|)": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/etcportage.nanorc on line 1: Command
"Code:" not understood
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/etcxml.nanorc on line 12: Bad regex
"/etc/fonts/(\.|/|)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/etcxml.nanorc on line 12: Bad regex
"/etc/xdg/(\.|/|)": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/gentoo.nanorc on line 19: Bad regex
"\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|
icon)\>": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/gentoo.nanorc on line 21: Bad regex
"prepall(|docs|info|man|strip)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/gentoo.nanorc on line 22: Bad regex
"\<(|doc|ins|exe)into\>": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/initscript.nanorc on line 3: Bad regex
"/etc/init.d/(\.|/|)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/initscript.nanorc on line 19: Bad regex
"\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|
icon)\>": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/initscript.nanorc on line 21: Bad regex
"prepall(|docs|info|man|strip)": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/initscript.nanorc on line 22: Bad regex
"\<(|doc|ins|exe)into\>": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/maincf.nanorc on line 2: Bad regex
"(\.|/|)cf$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/mcchangelog.nanorc on line 11: Bad regex
"\<(CEST|CET|CST||CDT|EDT)\>": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/others.nanorc on line 109: Bad regex
"/usr/bin(/|)|/usr/sbin|/bin|/sbin|/etc/init.d/": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/passwd.nanorc on line 2: Bad regex
"(\.|/|)passwd$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/passwd.nanorc on line 2: Bad regex
"(\.|/|)shadow$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/postgresql.nanorc on line 2: Bad regex
"\<(A(LL|NALY(S|Z)E|ND|NY|RRAY|S|SC|SYMMETRIC|UTHORIZATION)|B(ETWEEN|INARY|OTH|Y
)|C(ASE|AST|HECK|OLLATE|OLUMN|ONSTRAINT|REATE|ROSS|URRENT_(DATE|ROLE|TIME|TIMEST
AMP|USER))|D(EFAULT|EFERRABLE|ESC|ISTINCT|O|ROP)|E(LSE|ND|XCEPT)|F(ALSE|OR(EIGN)
?|REEZE|ROM|ULL)|GRANT|GROUP|HAVING|I(LIKE|N(ITIALLY|NER|TERSECT|TO)?|S|SNULL)|J
OIN|L(EADING|EFT|IKE|IMIT|OCALTIME(STAMP)?)|N(ATURAL|EW|OT(NULL)?|ULL)|O(FF(SET)
?|LD|N|NLY|R|RDER|UTER|VERLAPS)|PLACING|PRIMARY|REFERENCES|RIGHT|S(ELECT|ESSION_
USER|IMILAR|OME|YMMETRIC)|T(ABLE|HEN|O|RAILING|RUE)|UNION|UNIQUE|USER|USING|VE(I
W|RBOSE)|WHEN|WHERE|)\>": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/privoxy.nanorc on line 1: Bad regex
"(\.|/|)privoxy/config$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/privoxy.nanorc on line 17: Bad regex
"(\.|/|).action$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/profile.nanorc on line 2: Bad regex
"(\.|/|)profile$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/rcfiles.nanorc on line 2: Bad regex
"(\.|/|)control$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/sources_list.nanorc on line 6: Bad regex
"^deb(-src)? ((http|file|ftp):/[^
]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+ .+$": invalid
character range
Error in /usr/share/nano/syntax-nanorc/sources_list.nanorc on line 8: Bad regex
"^deb(-src)? ((http|file|ftp):/[^
]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+": invalid
character range
Error in /usr/share/nano/syntax-nanorc/sources_list.nanorc on line 13: Bad
regex "cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/": invalid character range
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/tab.nanorc on line 2: Bad regex
"(\.|/|)tab$": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/tcl.nanorc on line 16: Bad regex
"^([[:space:]]+|)#.*": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/vhost.nanorc on line 4: Bad regex
"(\.|/|)vhost\.conf": empty (sub)expression
Press Enter to continue starting nano.
Error in /usr/share/nano/syntax-nanorc/xdefaults.nanorc on line 2: Bad regex
"(\.|/|)default.$": empty (sub)expression
Error in /usr/share/nano/syntax-nanorc/xdefaults.nanorc on line 2: Bad regex
"(\.|/|)resource.$": empty (sub)expression
Press Enter to continue starting nano.
---------------
Original issue reported on code.google.com by [email protected]
on 5 Apr 2011 at 10:04
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.