scopatz / nanorc Goto Github PK
View Code? Open in Web Editor NEWImproved Nano Syntax Highlighting Files
License: Other
Improved Nano Syntax Highlighting Files
License: Other
Hello @scopatz,
Thanks for a terrific resource. Would you mind specifying the license for the files in your README (or in a separate file / in each file's comment) ? Just to help share the code in a clear way.
Hopefully, it's a permissive license (e.g. MIT/BSD/CC-SA) ?
Thanks!
Hi!
I just installed this on a FreeBSD machine with nano 2.7.0, and I found some errors.
I list all of them here instead of creating several issues.
(also, I don't know how they should best be corrected, so I create no PR's)
The files zshrc.nanorc and gitcommit.nanorc are totally wrong and cannot be included in nano.
Either you should remove them or fix them.
If you fix them, remember to also add an entry for zshrc in the file nanorc.
If you remove them, also remove the gitcommit entry in the file nanorc.
When you update the nanorc file, also add includes for these missing ones:
Nano 2.7.0 says:
Error in /home/foo/.nano/coffeescript.nanorc on line 4: Bad regex "[!&|=/*+-[[:<:]][[:>:]]]|[:<:][[:>:]]": invalid character range
Please fix the character range to whatever it should be.
Using GNU nano version 2.3.6 (on the Mac after brew tap homebrew/dupes
& brew install nano
), copying the recommended starting .nanorc from the clone, I get the following errors:
Error in /Users/ChristopherA/.nano/php.nanorc on line 30: Bad regex "('[^']*?')|(\"[^\"]*?\")": repetition-operator operand invalid
Error in /Users/ChristopherA/.nano/sh.nanorc on line 11: Bad regex "^\s+?[0-9A-Z_]+\s+?\(\)": repetition-operator operand invalid
Error in /Users/ChristopherA/.nano/zsh.nanorc on line 2: Bad regex "\.?zsh[^\.]+?$": repetition-operator operand invalid
Error in /Users/ChristopherA/.nano/zsh.nanorc on line 23: Bad regex "^\s+?(function\s+)?[0-9A-Z_]+\s+?\(\)": repetition-operator operand invalid
For now I have copied copied php.nanorc and sh.nanorc from brew files at /usr/local/share/nano/, but I've found no replacement for the bad zsh.nanoc.
-- Christopher Allen
We're all are lazy :) Please add following to readme:
$ git clone [email protected]:scopatz/nanorc.git ~/.nano
Beancount is a ledger-like accounting system that has a very ledger-like syntax. As such, beancount files can be partially parsed with the ledger syntax highlighting rules, provided that the file is named "*.ledger". The following modification to the "ledger.nanorc" file extends the syntax highlighting to beancount files (at least in a basic way).
1c1
< syntax "ledger" "(^|\.|/)ledger$"
---
> syntax "ledger" "(^|\.|/)ledger|lgr|beancount$"
3,4c3,4
< color brightmagenta "^([0-9]{4}/[0-9]{2}/[0-9]{2}|[=~]) .*"
< color blue "^[0-9]{4}/[0-9]{2}/[0-9]{2}"
---
> color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*"
> color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
Hi!
Please run:
cd ~/.nano/
grep ,green *
You will see that in 47 (out of 83) files, you highlight trailing whitespace as inverted green, like this:
color ,green "[[:space:]]+$"
This is great!
Could you please add the same to all files?
It works well in nano 2.7.4 on my mac, but it warning me "bad regex" when I upgrade to nano 2.8.0 by brew.
I tried to fix out that problem and found that I can replaces the characters '<' and '>' by \b in all the nanorc file, and the error message gone. But it may not be a good solution.
http://jimmybonney.com/articles/configure_nano_syntax_highlighting_synology/
Error message:
Error in /Users/vinson/.nano/rpmspec.nanorc on line 3: Bad regex "[:<:]:": Invalid character class name
Error in /Users/vinson/.nano/rpmspec.nanorc on line 4: Bad regex "[:<:]:": Invalid character class name
Currently, the following code block (and variations thereof) aren't highlighted with the javascript.nanorc
rules.
` this is an example ${template}`
`${template}`
``
I've tried (and failed) to create a solution, but will keep working on it.
Message
sh: 3: Syntax error: "(" unexpected
in the install command line
wget https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh -O- | sh
curl https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh
Any C or C++ source file appears with no highlighting at all.
Here is contents of the file. No errors in 2.7.4
2.8+ says bad regex.
Any idea if its a bug or just some tightening up of criteria that has caught out legit bad regex?, thanks.
`set tabsize 4
syntax "sh" ".sh$"
header "^#!./(ba|k|pdk)?sh[-0-9_]"
icolor brightgreen "^[0-9A-Z_]+()"
color green "[:<:][[:>:]]"
color green "({|}|(|)|;|]|[|`|\|$|<|>|!|=|&||)"
color green "-[Ldefgruwx][[:>:]]"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)[[:>:]]"
color brightcyan "[:<:][[:>:]]"
icolor brightred "${?[0-9A-Z_!@#$?-]+}?"
color cyan "(^|[[:space:]])#.$"
color brightyellow ""(\.|[^"])"" "'(\.|[^'])'"
color ,green "[[:space:]]+$"
color ,green "^([TAB]*[ ]{8})+"
color ,red "^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}"
syntax "php" ".php[2345s~]?$"
color brightgreen "(<?(php)?|?>)"
color white "[[:<:]][a-z_]*("
color green "[:<:][[:>:]]"
color brightyellow "[:<:][[:>:]]"
color magenta "[:<:][[:>:]]"
color brightyellow "<[^= ]>" ""(.|[^"])""
color cyan "//."
color cyan start="/*" end="*/"
#color blue start="<" end=">"
#color red "&[^;[[:space:]]];"
color ,green "[[:space:]]+$"
syntax "perl" ".p[lm]$"
header "^#!./perl[-0-9._]"
color red "[:<:][[:>:]]" "[:<:][[:>:]]" "[:<:][[:>:]]" "[:<:][[:>:]]" "[:<:][[:>:]]"
color magenta "[:<:][[:>:]]"
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 "html" ".html$"
color brightcyan start="<" end=">"
color red "&[^;[[:space:]]]*;"
syntax "cmake" "(CMakeLists.txt|.cmake)$"
icolor green "^[[:space:]][A-Z0-9_]+"
icolor brightyellow "^[[:space:]](include|include_directories|include_external_msproject)[[:>:]]"
icolor brightgreen "^[[:space:]]*[:<:][[:>:]]"
color brightgreen "[:<:][[:>:]][[:space:]]"
color brightgreen "[[:space:]][:<:][[:>:]][[:space:]]"
icolor brightred "^[[:space:]]*[:<:]"
icolor cyan start="$({|ENV{)" end="}"
color magenta "[:<:][[:>:]]"
icolor brightcyan "^([[:space:]])?#."
icolor brightcyan "[[:space:]]#.*"
color ,green "[[:space:]]+$"
syntax "makefile" "Makefile[^/]$"
color red "[:=]"
color magenta "[:<:][[:>:]]"
color brightcyan "$+[{(][a-zA-Z0-9_-]+[})]"
color brightcyan "^[^ ]+:"
color green "#.$"
syntax "css" ".css$"
color brightred "."
color brightyellow start="{" end="}"
color brightwhite start=":" end="([;^{]|$)"
color brightcyan ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
color brightcyan start="/*" end="\*/"
color green ";|:|{|}"
syntax "patch" ".(patch|diff)$"
color brightgreen "^+."
color green "^+++."
color brightcyan "^ ."
color brightred "^-."
color red "^---."
color brightyellow "^@@."
color magenta "^diff.*"
syntax "ruby" ".rb$"
header "^#!./ruby[-0-9._]"
color yellow "[:<:][[:>:]]"
color brightcyan "($|@|@@)?[[:<:]][A-Z]+[0-9A-Z_a-z]*"
icolor magenta "([ ]|^):[0-9A-Z_]+[[:>:]]"
color brightyellow "[:<:][[:>:]]"
color brightmagenta "/([^/]|(\/))/[iomx]" "%r{([^}]|(\}))}[iomx]"
backticks
or like %x{this}. These arecolor brightcyan "[^
]`" "%x{[^}]}"
color green ""([^"]|(\"))"" "%[QW]?{[^}]}" "%[QW]?([^)])" "%[QW]?<[^>]>" "%[QW]?[[^]]]" "%[QW]?$[^$]$" "%[QW]?^[^^]^" "%[QW]?![^!]!"
color brightgreen "#{[^}]*}"
color green "'([^']|(\'))'" "%[qw]{[^}]}" "%[qw]([^)])" "%[qw]<[^>]>" "%[qw][[^]]]" "%[qw]$[^$]$" "%[qw]^[^^]^" "%[qw]![^!]!"
color cyan "#[^{].$" "#$"
color brightcyan "##[^{].
color green start="<<-?'?EOT'?" end="^EOT"
color brightcyan "(XXX|TODO|FIXME|???)"
syntax "xml" ".([jrs]html?|sgml?|xml|xslt?)$"
color green start="<" end=">"
color cyan "<[^> ]+"
color cyan ">"
color yellow start="<!DOCTYPE" end="[/]?>"
color yellow start=""
color red "&[^;]*;"
color ,green "[[:space:]]+$"
color ,green "^([TAB]*[ ]{8})+"
color ,red "^(([ ]{2})+|(TAB+))*[ ]{1}[^ ]{1}"`
I am using nano on a Mac installed by homebrew brew tap homebrew/dupes
& brew install cask nano
It installs nano 2.7
$ nano --version
GNU nano, version 2.7.0
(C) 1999..2016 Free Software Foundation, Inc.
(C) 2014..2016 the contributors to nano
Email: [email protected] Web: https://nano-editor.org/
Compiled options: --disable-libmagic --enable-utf8
When I use your nanorc file, and I startup nano, I get:
Error in /Users/admin/.nano/git.nanorc on line 19: A syntax name must be quoted
Error in /Users/admin/.nano/git.nanorc on line 22: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 25: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 28: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 29: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 30: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 31: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 32: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 35: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 37: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 38: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 39: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 40: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 41: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 46: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 49: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 53: A syntax name must be quoted
Error in /Users/admin/.nano/git.nanorc on line 56: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 59: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 62: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 63: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 64: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 65: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 66: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 67: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 68: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 69: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 70: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 71: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 72: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 73: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 76: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/git.nanorc on line 79: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 19: A syntax name must be quoted
Error in /Users/admin/.nano/gitcommit.nanorc on line 22: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 25: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 28: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 29: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 30: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 31: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 32: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 35: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 37: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 38: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 39: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 40: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 41: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 46: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 49: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 53: A syntax name must be quoted
Error in /Users/admin/.nano/gitcommit.nanorc on line 56: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 59: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 62: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 63: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 64: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 65: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 66: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 67: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 68: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 69: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 70: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 71: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 72: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 73: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 76: A 'color' command requires a preceding 'syntax' command
Error in /Users/admin/.nano/gitcommit.nanorc on line 79: A 'color' command requires a preceding 'syntax' command
Press Enter to continue starting nano.
In the first place, great job. Finally I can enjoy of the syntax highlight in nano.
However, after installing, I have those error messages when I open nano:
Error in /root/.nano/awk.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/coffeescript.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/ini.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/json.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/makefile.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/nginx.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/sed.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/systemd.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /root/.nano/yaml.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
$ nano
Error in /home/palermo/GIT/nanorc/prolog.nanorc on line 3: Regex strings must begin and end with a " character
Error in /home/palermo/GIT/nanorc/prolog.nanorc on line 4: Command "comment" not understood
Error in /home/palermo/GIT/nanorc/prolog.nanorc on line 7: Color "normal" not understood.
Valid colors are "green", "red", "blue",
"white", "yellow", "cyan", "magenta" and
"black", with the optional prefix "bright"
for foreground colors.
Error in /home/palermo/GIT/nanorc/prolog.nanorc on line 21: Color "normal" not understood.
Valid colors are "green", "red", "blue",
"white", "yellow", "cyan", "magenta" and
"black", with the optional prefix "bright"
for foreground colors.
Press Enter to continue starting nano.
GNU nano, version 2.5.3
(C) 1999..2016 Free Software Foundation, Inc.
Email: [email protected] Web: http://www.nano-editor.org/
Compiled options: --disable-libmagic --disable-wrapping-as-root --enable-utf8
Merge: 19feaf5 0726842
Author: Anthony Scopatz <[email protected]>
Date: Wed Sep 5 08:30:59 2018 -0400
Merge pull request #185 from yochem/master
Added syntax highlighting for Prolog
Line 24.
You should remove the trailing pipe character after yes in coreutils regex
I tapped into dupes, installed nano, then ran this command to add syntax highlighting for all languages:
$ /bin/ls /usr/local/share/nano/*.nanorc | xargs -I {} echo 'include "{}"' >> ~/.nanorc
Now when I run nano I get this error:
Error in /usr/local/Cellar/nano/2.2.6/share/nano/mgp.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /usr/local/Cellar/nano/2.2.6/share/nano/perl.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /usr/local/Cellar/nano/2.2.6/share/nano/python.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /usr/local/Cellar/nano/2.2.6/share/nano/ruby.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /usr/local/Cellar/nano/2.2.6/share/nano/sh.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
I'm kind of new to this tap; any suggestions where to start, or is this an easy fix I could dive into?
Error in /usr/share/nano-syntax-highlighting/yaml.nanorc on line 2: Command "comment" not understood
As the title says, I'm getting no highlighting in either markdown and c# (so far I've checked python, rst, md and c#). I cloned the repo and then added all the languages to the .nanorc file as per the instructions.
First of all, thanks for all the work you put in these rc files!
OS: Mac
Nano: 2.9.5 (brew)
Terminal: Hyper
When i tried using the yaml.nanorc
file, it worked only partly (only the whitespaces aka the last 2)
Here is a screenshot of a yaml file with the current rc file:
I created my own yaml rc file. The colors are inspired on the Atom One Dark theme.
Let me know what you think!
Steps to reproduce:
Create an .html
file called example.html
with nano:
nano example.html
Paste the following code into the file:
<a target="_blank">link1</a><a target="_blank">link2</a>
Note that these characters "_blank">link1</a><a
appear yellow. However, only "_blank"
should appear yellow.
Add Capfile and Vagrantfile to the list of filenames to highlight as ruby. Capfile is for Capistrano, Vagrantfile is for Vagrant...
I ran the install.sh and then my nano got a bunch of errors:
$ nano .nanorc
Error in /home/ec2-user/.nano/awk.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/coffeescript.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/ini.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/json.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/makefile.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/nginx.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/perl.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/python.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/ruby.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/sed.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/sh.nanorc on line 4: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/systemd.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/tcl.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/yaml.nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Error in /home/ec2-user/.nano/zsh.nanorc on line 3: Command "header" not understood
Press Enter to continue starting nano.
Without this option, it makes it a bit awkward to install on shared machines. Better to install under /usr/local/share
in that use case.
Since commit a983d29 I get the following error with nano 2.6.1
Error in /usr/share/nano-syntax-highlighting/coffeescript.nanorc on line 4: Bad regex "[!&|=/*+\-<>]|\<(and|or|is|isnt|not)\>": Invalid range end
Press Enter to continue starting nano.
After following the installation instructions, there are several errors when running nano:
awk.nanorc line 2: command "header" not understood
coffeescript.nanorc line 2: command "header" not understood
ini.nanorc line 2: command "header" not understood
json.nanorc line 2: command "header" not understood
makefile.nanorc line 2: command "header" not understood
nginx.nanorc line 2: command "header" not understood
perl.nanorc line 4: command "header" not understood
python.nanorc line 4: command "header" not understood
ruby.nanorc line 4: command "header" not understood
sed.nanorc line 2: command "header" not understood
sh.nanorc line 4: command "header" not understood
sh. nanorc line 11: bad regex "^\s+?[0-9A-Z_]++?()": repetition-operator operand invalid
systemd.nanorc line 2: command "header" not understood
tcl.nanorc: line 2: command "header" not understood
yaml.nanorc line 2: command "header" not understood
zsh.nanorc line 2: bad regex ".?zsh[^.]+?$": repetition-operator operand invalid
zsh.nanorc line 3: command "header" not understood
zsh.nanorc line 23: bad regex "^\s+?(function\s+)?[0-9A-Z_]+\s+?()": repetition-operator operand invalid
Hilariously, on mac, the \ appears to be a regular character escape when applied to < and >, so for example the "return" coloring gets applied to (the string literal) "" but not to actual return keywords like it's supposed to.
nano comes with predefined .nanorc files, which are located in /usr/share/nano/
(may be somewhere else on your OS)
It is a bad idea to redefine existing syntax definitions, since that can cause other syntax definitions to break. For example:
syntax "xml" # ignored!
… # ignored!
syntax "markdown" # ignored!
… # ignored!
syntax "xml"
…
This also happens if the definitions come from different files, and even if they're included automatically. For example, including xml.nanorc may break the highlighting for markdown(!) — see #87
# include /usr/share/nano/*.nanorc # nano does this internally
include "~/.nano/markdown.nanorc"
include "~/.nano/xml.nanorc" # redefines "xml" syntax, and thus breaks markdown
Results may vary, depending on the order and amount of includes.
A quick fix consists in using different syntax names.
Here is a list of nano's bundled syntax names in v2.5.3
asm
autoconf
awk
c
changelog
cmake
css
sources.list
default
elisp
fortran
ebuild
/etc/portage
go
groff
guile
html
java
javascript
json
lua
makefile
man
mgp
mutt
nanorc
nftables
m
ocaml
patch
perl
php
po
sql
pov
python
ruby
sh
spec
tcl
tex
texinfo
xml
And these are problematic, since they get redefined by this project:
asm
awk
cmake
c
css
fortran
gentoo
go
groff
html
java
json
lua
makefile
man
mutt
nanorc
ocaml
patch
perl6
perl
php
po
pov
python
ruby
sh
sql
tcl
tex
Error in ~/.nano/json.nanorc on line 2: Command "header" not understood
json.nanorc seems to have a header command:
header "^\{$"
This is similar to #3, using nano 2.2.6 on OSX compiled by homebrew, I get errors in cython.nanorc
, fish.nanorc
and pkgbuild.nanorc
:
Error in /usr/local/Cellar/nano/2.2.6/share/nano/cython.nanorc on line 5: Bad regex "cpdef [ 0-9A-Z_]+\(.*?\):": repetition-operator operand invalid
Error in /usr/local/Cellar/nano/2.2.6/share/nano/cython.nanorc on line 6: Bad regex "cdef cppclass [ 0-9A-Z_]+\(.*?\):": repetition-operator operand invalid
Error in /usr/local/Cellar/nano/2.2.6/share/nano/fish.nanorc on line 4: Command "magic" not understood
Error in /usr/local/Cellar/nano/2.2.6/share/nano/pkgbuild.nanorc on line 7: Bad regex "(\$|\$\{|\$\()(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)(|\}|\))": empty (sub)expression
Error in /usr/local/Cellar/nano/2.2.6/share/nano/pkgbuild.nanorc on line 10: Bad regex "(\$|\$\{|\$\()(depends|makedepends|optdepends|conflicts|provides|replaces)(|\}|\))": empty (sub)expression
Error in /usr/local/Cellar/nano/2.2.6/share/nano/pkgbuild.nanorc on line 13: Bad regex "(\$|\$\{|\$\()(groups|backup|noextract|options)(|\}|\))": empty (sub)expression
Error in /usr/local/Cellar/nano/2.2.6/share/nano/pkgbuild.nanorc on line 16: Bad regex "(\$|\$\{|\$\()(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)(|\}|\))": empty (sub)expression
Any chance for branch that uses the Solarized theme? It is probably the most popular color theme.
-- Christopher Allen
Thanks for these! FYI this one file seems to have issues
Error in /Users/whoami/.nano/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 /Users/whoami/.nano/gentoo.nanorc on line 21: Bad regex "prepall(|docs|info|man|strip)": empty (sub)expression
Error in /Users/whoami/.nano/gentoo.nanorc on line 22: Bad regex "<(|doc|ins|exe)into>": empty (sub)expression
mac os x 10.6.8
nano 2.0.6 (whoa really old could that be it?)
I've been trying nginx highlighter,
I think red color is a little distractive for tabs and spaces.
(of course it's personal but I wanted to share )
Using this repository.. just open up a new javascript file and type ()... the ( is set to the background color.
I can't figure this out however.. I don't see where that is obvious in the javascript.nanorc.
Hi.
I have a problem after installation. If I will try to edit ini file with nano its all black.
I found that in ini.nanorc color set to "brightblack". It's a mistake?
http://share-srv.pulsarfour.com/am/putty_2017-09-12_09-17-55.png
Thank you so much for maintaining this branch
I've been using nano on all my *NIX variants for years and the syntax highlighting is so, so great
Please keep the repo up indefinitely!
Thank you - thank you - thank you - thank you!
Error in ~/.nano/yaml.nanorc on line 9: Bad regex "(^|\s+).+\s:(\s|$)": repetition-operator operand invalid
If the user already had a ~/.nanorc, the installer will completely scramble it as it does a sort -u in the process.
THe result is a file with all preferences and comments sorted alphabetically. Especially if a comment was multiline, the line are separated and moved all around the file. Also all blank lines are removed, ending in an unstructured file.
Hey! Is it possible to add the "set linenumber" to your config files? Thanks!
Why do we have two different files for JavaScript - namely js.nanorc
and javascript.nanorc
- here?
./install.sh: 3: ./install.sh: Syntax error: "(" unexpected
We seem to have two javascript syntax files, javascript.nanorc
and js.nanorc
. Is this purposeful, and if not, shall we remove one of them?
Here is a quick comparison by line number:
NANORC_GIT_DIR = "~/git/nanorc"
NANORC_STD_DIR = "/usr/share/nano"
standard_nanorcs = `ls #{NANORC_STD_DIR} | xargs wc -l`.split("\n").map { |row| lcount, fname = row.lstrip.split(" "); [lcount.to_i, fname]}[0...-1]
standard_nanorcs.each do |lcount, fname|
`test -e #{NANORC_GIT_DIR}/#{fname}`
next unless $? == 0
lcount_new = `wc -l #{NANORC_GIT_DIR}/#{fname}`.split(" ").first.to_i
if lcount > lcount_new
puts "Standard syntax definition is more verbose for: #{fname}... #{lcount} vs #{lcount_new}"
end
end
Standard syntax definition is more verbose for: asm.nanorc... 25 vs 17
Standard syntax definition is more verbose for: awk.nanorc... 37 vs 25
Standard syntax definition is more verbose for: gentoo.nanorc... 68 vs 50
Standard syntax definition is more verbose for: go.nanorc... 46 vs 22
Standard syntax definition is more verbose for: groff.nanorc... 26 vs 24
Standard syntax definition is more verbose for: html.nanorc... 28 vs 11
Standard syntax definition is more verbose for: java.nanorc... 16 vs 13
Standard syntax definition is more verbose for: json.nanorc... 34 vs 11
Standard syntax definition is more verbose for: man.nanorc... 18 vs 9
Standard syntax definition is more verbose for: mutt.nanorc... 9 vs 4
Standard syntax definition is more verbose for: nanorc.nanorc... 29 vs 16
Standard syntax definition is more verbose for: ocaml.nanorc... 29 vs 27
Standard syntax definition is more verbose for: patch.nanorc... 26 vs 10
Standard syntax definition is more verbose for: po.nanorc... 29 vs 8
Standard syntax definition is more verbose for: pov.nanorc... 18 vs 15
Standard syntax definition is more verbose for: ruby.nanorc... 35 vs 34
Standard syntax definition is more verbose for: sh.nanorc... 29 vs 15
Standard syntax definition is more verbose for: xml.nanorc... 21 vs 14
While sometimes the verbose definition might not be superior - it clearly is in a number of cases. For example here is the po.nanorc
from the upstream repo:
## Colouring for PO files.
syntax "po" "\.pot?$"
comment "#"
# Comments.
color green "^#.*$"
color yellow "Copyright|\(C\)"
# Header fields.
color brightred "^\"X-Bugs:.*\"$"
color brightmagenta "\<(Project\-Id\-Version|Report\-Msgid\-Bugs\-To|Last\-Translator|Language(\-Team)?|X-Bugs|X-Generator|Plural\-Forms)\>"
color cyan "\<(POT\-Creation\-Date|PO\-Revision\-Date|MIME\-Version|Content\-Type|Content\-Transfer\-Encoding)\>"
# Encodings and numbers.
color yellow "\<(UTF|ISO|Windows|Mac|IBM)\>\-[0-9]"
color yellow "[0-9]|pre[0-9]|[0-9]bit"
# Msgids.
color brightblue "^(msgid|msgid_plural|msgstr)\>"
# Tags.
color red " fuzzy(,|$)"
color yellow " (no-)?[-[:alpha:]]+-format(,|$)"
# Format specifiers.
color brightmagenta "%([1-9]\$)?[a-z]*"
# Quotes and newlines.
color yellow "\""
color cyan "\\n"
# Reminders.
color ,yellow "(FIXME|TODO|XXX)"
# Obsolete strings.
color red "#~.*$"
vs. the one provided by this repo:
syntax "PO" "\.pot?$"
color cyan "\<(msgid|msgstr)\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
I'd recommend remove syntax definitions which already exist upstream, or to add a note in the README regarding the ones which may be out-dated.
Hi! I am using apacheconf.nanorc on Centos 6.5 and I am getting a bunch of Regex errors
nano --version
GNU nano version 2.2.6 (compiled 01:54:56, Nov 22 2010)
(C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009 Free Software Foundation, Inc.
Email: [email protected] Web: http://www.nano-editor.org/
Compiled options: --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8
Error in /usr/share/nano/apacheconf.nanorc on line 4: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 5: Command ""(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 6: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 7: Command ""(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 8: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 9: Command ""(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 10: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 11: Command ""(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 12: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 13: Command ""(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 14: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 15: Command ""(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 16: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 17: Command ""(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 18: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 19: Command ""(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 20: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 21: Command ""(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 22: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 23: Command ""(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 24: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 25: Command ""(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 26: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 27: Command ""(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 28: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 29: Command ""(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 30: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 31: Command ""(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 32: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 33: Command ""(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 34: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 35: Command ""(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 36: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 37: Command ""(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 38: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 39: Command ""(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 40: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 41: Command ""(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 42: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 43: Command ""(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 44: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 45: Command ""(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 46: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 47: Command ""(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 48: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 49: Command ""(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 50: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 51: Command ""(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 52: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 53: Command ""(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 54: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 55: Command ""(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 56: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 57: Command ""(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 58: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 59: Command ""(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 60: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 61: Command ""(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 62: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 63: Command ""(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 64: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 65: Command ""(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 66: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 67: Command ""(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 68: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 69: Command ""(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 70: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 71: Command ""(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)"" not understood
Error in /usr/share/nano/apacheconf.nanorc on line 72: Missing regex string
Error in /usr/share/nano/apacheconf.nanorc on line 73: Command ""(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)"" not understood
I really wouldn't know how to fix these — but perhaps somebody else might.
Hey guys,
nano didn't show highlighting till I put quotes on every include statement in that file? Should I fire a pull request with the fix?
GNU nano version 2.2.6 (compiled 16:56:37, Jul 16 2014)
(C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009 Free Software Foundation, Inc.
Email: [email protected] Web: http://www.nano-editor.org/
Compiled options: --disable-wrapping-as-root --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8
The multiline triple quotes in Python tend to highlight most part of the document like it is a string. More particularly when you have multiple multiline triple quotes in a document (for instance when there are multiple documented functions).
What's weird is that the document looks okay when loading it. It considers everything as a doc string when adding a new line to the code...
Purely cosmetic issue, but all comment highlighting should be the last in each nanorc. Since nano parses these configurations line by line from top to bottom, any definitions after the comment highlighting will be highlighted even if its within a comment, which is undesirable.
I added just wanted the sql highlighting and included that file in my ~/.nanorc
When I open a SQL file with nano I now get the following errors:
Error in /usr/local/share/nano/sql.nanorc on line 6: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 7: Command ""\<(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\>"" not understood
Error in /usr/local/share/nano/sql.nanorc on line 11: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 12: Command ""\<(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\>"" not understood
Error in /usr/local/share/nano/sql.nanorc on line 14: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 15: Command ""\<(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\>"" not understood
Error in /usr/local/share/nano/sql.nanorc on line 19: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 20: Command ""\<(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\>"" not understood
Error in /usr/local/share/nano/sql.nanorc on line 22: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 23: Command ""\<(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\>"" not understood
Error in /usr/local/share/nano/sql.nanorc on line 26: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 27: Command ""\<(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\>"" not understood
Error in /usr/local/share/nano/sql.nanorc on line 31: Missing regex string
Error in /usr/local/share/nano/sql.nanorc on line 32: Command ""\.\<(import|indices|mode|nullvalue|output|prompt|quit|read)\>"" not understood
The highlighting still seems to work though.
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.