Improved Nano Syntax Highlighting Files
Switch branches/tags
Nothing to show
Clone or download
scopatz Merge pull request #190 from tomcharter365/patch-1
Fix not balanced parentheses in js.nanorc
Latest commit 37a6113 Oct 11, 2018
Permalink
Failed to load latest commit information.
.gitignore ignore nano `search_history` Aug 27, 2018
.travis.yml introduce travis/shellcheck Dec 28, 2017
Dockerfile.nanorc Initial commit Feb 8, 2016
Readme.rst change AUR Hepler to aurman (or others) Aug 15, 2018
apacheconf.nanorc Color trailing whitespace green Dec 6, 2016
arduino.nanorc Rename syntax definitions Mar 2, 2016
asciidoc.nanorc Rename syntax definitions Mar 2, 2016
asm.nanorc Rename syntax definitions Mar 2, 2016
awk.nanorc Rename syntax definitions Mar 2, 2016
c.nanorc uncomment whitespace highlighting Jun 10, 2016
clojure.nanorc Update clojure.nanorc Aug 30, 2016
cmake.nanorc Highlight whitespace Jun 12, 2016
coffeescript.nanorc coffeescript regex escapes fixed Jul 17, 2016
colortest.nanorc Rename syntax definitions Mar 2, 2016
conf.nanorc Color trailing whitespace green Dec 6, 2016
conky.nanorc Rename syntax definitions Mar 2, 2016
csh.nanorc Add files via upload Jul 16, 2017
csharp.nanorc Rename syntax definitions Mar 2, 2016
css.nanorc Color trailing whitespace green Dec 6, 2016
cython.nanorc Color trailing whitespace green Dec 6, 2016
dot.nanorc Rename syntax definitions Mar 2, 2016
dotenv.nanorc add .env file syntax highlight Jun 13, 2018
email.nanorc Rename syntax definitions Mar 2, 2016
erb.nanorc Color trailing whitespace green Dec 6, 2016
fish.nanorc Rename syntax definitions Mar 2, 2016
fortran.nanorc Color trailing whitespace green Dec 6, 2016
genie.nanorc Add comments Feb 28, 2017
gentoo.nanorc Rename syntax definitions Mar 2, 2016
git.nanorc For conformity, color trailing whitespace green, not red Dec 6, 2016
gitcommit.nanorc Initial commit Feb 8, 2016
glsl.nanorc Rename syntax definitions Mar 2, 2016
go.nanorc Rename syntax definitions Mar 2, 2016
groff.nanorc Rename syntax definitions Mar 2, 2016
haml.nanorc Color trailing whitespace green Dec 6, 2016
haskell.nanorc Color trailing whitespace green Dec 6, 2016
html.j2.nanorc added html with jinja templating May 27, 2018
html.nanorc Color trailing whitespace green Dec 6, 2016
i3.nanorc Added i3 windows manager config file syntax Jan 23, 2017
ical.nanorc Create ical.nanorc Sep 30, 2016
ini.nanorc highlight standard comments May 25, 2017
inputrc.nanorc Rename syntax definitions Mar 2, 2016
install.sh Check for unzip Jul 14, 2018
java.nanorc Added basic number highlighting Aug 30, 2016
javascript.nanorc Added ECMAScript 2015/6/7 keywrods and types to the two JavaScript sy… Jul 16, 2017
js.nanorc Fix not balanced parentheses Oct 11, 2018
json.nanorc Rename syntax definitions Mar 2, 2016
keymap.nanorc Rename syntax definitions Mar 2, 2016
kickstart.nanorc Initial commit Feb 8, 2016
ledger.nanorc Rename syntax definitions Mar 2, 2016
license Initial commit Feb 8, 2016
lisp.nanorc Rename syntax definitions Mar 2, 2016
lua.nanorc Highlight trailing whitespaces Apr 30, 2016
makefile.nanorc makefile: bightmagenta for start of lines beginning with += Oct 11, 2016
man.nanorc Rename syntax definitions Mar 2, 2016
markdown.nanorc Fixing quotes that span more than one line. Dec 21, 2017
mpdconf.nanorc Rename syntax definitions Mar 2, 2016
mutt.nanorc Rename syntax definitions Mar 2, 2016
nanorc add .env file syntax highlight Jun 13, 2018
nanorc.nanorc nanorc.nanorc: add positionlog keyword Sep 10, 2018
nginx.nanorc Update nginx.nanorc Apr 23, 2018
ocaml.nanorc Color trailing whitespace green Dec 6, 2016
patch.nanorc Rename syntax definitions Mar 2, 2016
peg.nanorc Rename syntax definitions Mar 2, 2016
perl.nanorc Color trailing whitespace green Dec 6, 2016
perl6.nanorc Color trailing whitespace green Dec 6, 2016
php.nanorc Remove bad escape Mar 2, 2016
pkg-config.nanorc Rename syntax definitions Mar 2, 2016
pkgbuild.nanorc Add validpgpkeys to pkgbuild keywords Apr 15, 2017
po.nanorc Rename syntax definitions Mar 2, 2016
pov.nanorc Rename syntax definitions Mar 2, 2016
privoxy.nanorc Rename syntax definitions Mar 2, 2016
prolog.nanorc Added prolog syntax highlighting Sep 5, 2018
puppet.nanorc Fixed typo (and changed color) for trailing whitespace Dec 6, 2016
python.nanorc Color trailing whitespace green Dec 6, 2016
reST.nanorc Rename syntax definitions Mar 2, 2016
rpmspec.nanorc Rename syntax definitions Mar 2, 2016
ruby.nanorc Color trailing whitespace green Dec 6, 2016
rust.nanorc Color trailing whitespace green Dec 6, 2016
scala.nanorc Rename syntax definitions Mar 2, 2016
sed.nanorc Rename syntax definitions Mar 2, 2016
sh.nanorc Added "revise" temporary files from composure (github.com/erichs/comp… Jan 3, 2017
shellcheck.sh introduce travis/shellcheck Dec 28, 2017
sls.nanorc Color trailing whitespace green Dec 6, 2016
sql.nanorc Rename syntax definitions Mar 2, 2016
svn.nanorc add syntax highlight for svn commit file Apr 3, 2018
swift.nanorc added Unicode and Integer Literals May 5, 2016
systemd.nanorc Rename syntax definitions Mar 2, 2016
tcl.nanorc For conformity, color trailing whitespace green, not blue Dec 6, 2016
tex.nanorc Update tex.nanorc Aug 29, 2016
vala.nanorc Rename syntax definitions Mar 2, 2016
verilog.nanorc Added Verilog May 12, 2018
vi.nanorc Rename syntax definitions Mar 2, 2016
xml.nanorc Color trailing whitespace green Dec 6, 2016
xresources.nanorc Rename syntax definitions Mar 2, 2016
yaml.nanorc YAML comments are now grey/brightblue Jul 3, 2018
yum.nanorc Rename syntax definitions Mar 2, 2016
zsh.nanorc Add .zsh-theme ext to zsh.nanorc Feb 4, 2018
zshrc.nanorc Initial commit Feb 8, 2016

Readme.rst

Improved Nano Syntax Highlighting Files

This repository holds {lang}.nanorc files that have improved definitions of syntax highlighting for various languages.

1. Copy files

These should be placed inside of the ~/.nano/ directory. Or for system-wide installation /usr/share/nano-syntax-highlighting/. In other words:

git clone git@github.com:scopatz/nanorc.git ~/.nano

*Note - if you have any issues (ssh was not properly configured), alternatively use:

git clone https://github.com/scopatz/nanorc.git ~/.nano

System wide will look like so:

sudo git clone https://github.com/scopatz/nanorc.git /usr/share/nano-syntax-highlighting/

NOTE: < and > are regular character escapes on macOS. The bug's fixed in Nano, but this might be a problem if you are using an older version. If this is the case, replace them respectively with [[:<:]] and [[:>:]]. This is reported in issue 52

2. Configure nano

Once there you should add the languages you want to your nano configuration file ~/.nanorc. For example:

## C/C++
include "~/.nano/c.nanorc"

You can also append the contents of ~/.nano/nanorc into your ~/.nanorc to include all languages:

cat ~/.nano/nanorc >> ~/.nanorc

Or to be less verbose, append content of the folder in one line with wildcard:

## For all users
$ echo "include $install_path/*.nanorc" >> /etc/nanorc
## For current user
$ echo "include $install_path/*.nanorc" >> ~/.nanorc

where $install_path is /usr/share/nano-syntax-highlighting or ~/.nano/ or ...

1a. Automatic installer

Finally, you can run an automatic installer using the following code:

$ curl https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh

or alternatively:

$ wget https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh -O- | sh
*Note -
some syntax definitions which exist in Nano upstream may be preferable to the ones provided by this package. The install.sh script may be run with -l or --lite to insert the included syntax definitions from this package with lower precedence than the ones provided by the standard package.

1b. Distributive specific installation via package managers

On Arch Linux and other pacman/aur based systems it is possible to:

$ aurman -S nano-syntax-highlighting-git

or search package:

$ aurman -Ss nano-syntax-highlight

Then you need to mannually add .nanorc-s to user's ~/.nanorc or system /etc/nanorc. See $2