Improved Nano Syntax Highlighting Files. Forked: https://github.com/scopatz/nanorc
Go to file
Richard Fleming 2f5ca7b681
Fixes nano's complaints with prolog.nanorc
1. Nano complains that `syntax` requires strings to be quoted.
2. `color normal` fails.  Color can only be white, black, red, blue, green, yellow, magenta, and cyan
2018-10-11 00:24:41 -04:00
.gitignore ignore nano search_history 2018-08-27 09:57:14 -05:00
.travis.yml introduce travis/shellcheck 2017-12-28 01:31:13 -05:00
apacheconf.nanorc Color trailing whitespace green 2016-12-06 21:37:13 +01:00
arduino.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
asciidoc.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
asm.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
awk.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
c.nanorc uncomment whitespace highlighting 2016-06-10 21:39:11 +02:00
clojure.nanorc Update clojure.nanorc 2016-08-30 13:02:50 -07:00
cmake.nanorc Highlight whitespace 2016-06-12 18:48:32 +02:00
coffeescript.nanorc coffeescript regex escapes fixed 2016-07-17 18:49:37 +08:00
colortest.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
conf.nanorc Color trailing whitespace green 2016-12-06 21:47:45 +01:00
conky.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
csh.nanorc Add files via upload 2017-07-16 05:27:32 +03:00
csharp.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
css.nanorc Color trailing whitespace green 2016-12-06 21:50:19 +01:00
cython.nanorc Color trailing whitespace green 2016-12-06 21:56:28 +01:00
Dockerfile.nanorc Added dockerfile syntax highlighting for *.dockerfile 2015-10-21 09:27:43 -04:00
dot.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
dotenv.nanorc add .env file syntax highlight 2018-06-13 16:15:43 +02:00
email.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
erb.nanorc Color trailing whitespace green 2016-12-06 21:58:21 +01:00
fish.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
fortran.nanorc Color trailing whitespace green 2016-12-06 21:59:24 +01:00
genie.nanorc Add comments 2017-02-28 18:50:10 +04:00
gentoo.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
git.nanorc For conformity, color trailing whitespace green, not red 2016-12-06 22:41:58 +01:00
gitcommit.nanorc added alias to gitcommit for backwards compatibility in nanorc files 2013-05-31 15:45:45 -05:00
glsl.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
go.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
groff.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
haml.nanorc Color trailing whitespace green 2016-12-06 22:00:19 +01:00
haskell.nanorc Color trailing whitespace green 2016-12-06 22:02:16 +01:00
html.j2.nanorc added html with jinja templating 2018-05-28 01:29:36 +08:00
html.nanorc Color trailing whitespace green 2016-12-06 22:03:16 +01:00
i3.nanorc Added i3 windows manager config file syntax 2017-01-23 11:00:40 -06:00
ical.nanorc Create ical.nanorc 2016-09-30 08:56:06 +02:00
ini.nanorc highlight standard comments 2017-05-25 13:35:02 +02:00
inputrc.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
install.sh Check for unzip 2018-07-14 19:16:55 -04:00
java.nanorc Added basic number highlighting 2016-08-30 14:29:01 -07:00
javascript.nanorc Added ECMAScript 2015/6/7 keywrods and types to the two JavaScript syntac files. 2017-07-16 13:49:51 +02:00
js.nanorc Added ECMAScript 2015/6/7 keywrods and types to the two JavaScript syntac files. 2017-07-16 13:46:55 +02:00
json.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
keymap.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
kickstart.nanorc Change tab coloring behavior for several rc's 2015-10-24 06:58:36 -04:00
ledger.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
license whoops needed to do add 2014-03-04 22:54:17 -06:00
lisp.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
lua.nanorc Highlight trailing whitespaces 2016-04-30 19:44:51 +02:00
makefile.nanorc makefile: bightmagenta for start of lines beginning with += 2016-10-11 18:09:02 -05:00
man.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
markdown.nanorc Fixing quotes that span more than one line. 2017-12-20 23:49:51 -06:00
mpdconf.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
mutt.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
nanorc add .env file syntax highlight 2018-06-13 16:15:43 +02:00
nanorc.nanorc nanorc.nanorc: add positionlog keyword 2018-09-10 14:25:37 +02:00
nginx.nanorc Update nginx.nanorc 2018-04-23 15:28:19 +03:00
ocaml.nanorc Color trailing whitespace green 2016-12-06 22:07:25 +01:00
patch.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
peg.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
perl.nanorc Color trailing whitespace green 2016-12-06 22:10:38 +01:00
perl6.nanorc Color trailing whitespace green 2016-12-06 22:11:12 +01:00
php.nanorc Remove bad escape 2016-03-03 00:50:39 +01:00
pkg-config.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
pkgbuild.nanorc Add validpgpkeys to pkgbuild keywords 2017-04-15 18:41:21 +02:00
po.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
pov.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
privoxy.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
prolog.nanorc Fixes nano's complaints with prolog.nanorc 2018-10-11 00:24:41 -04:00
puppet.nanorc Fixed typo (and changed color) for trailing whitespace 2016-12-06 19:11:24 +01:00
python.nanorc Color trailing whitespace green 2016-12-06 22:13:04 +01:00
Readme.rst change AUR Hepler to aurman (or others) 2018-08-15 15:22:08 +08:00
reST.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
rpmspec.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
ruby.nanorc Color trailing whitespace green 2016-12-06 22:14:27 +01:00
rust.nanorc Color trailing whitespace green 2016-12-06 22:15:38 +01:00
scala.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
sed.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
sh.nanorc Added "revise" temporary files from composure (github.com/erichs/composure) 2017-01-03 17:07:03 -05:00
shellcheck.sh introduce travis/shellcheck 2017-12-28 01:31:13 -05:00
sls.nanorc Color trailing whitespace green 2016-12-06 22:17:01 +01:00
sql.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
svn.nanorc add syntax highlight for svn commit file 2018-04-03 22:49:51 +02:00
swift.nanorc added Unicode and Integer Literals 2016-05-05 12:07:14 +02:00
systemd.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
tcl.nanorc For conformity, color trailing whitespace green, not blue 2016-12-06 22:43:53 +01:00
tex.nanorc Update tex.nanorc 2016-08-28 21:39:10 -07:00
vala.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
verilog.nanorc Added Verilog 2018-05-12 12:55:55 +02:00
vi.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
xml.nanorc Color trailing whitespace green 2016-12-06 22:19:02 +01:00
xresources.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
yaml.nanorc YAML comments are now grey/brightblue 2018-07-03 21:32:35 +02:00
yum.nanorc Rename syntax definitions 2016-03-02 20:51:19 +01:00
zsh.nanorc Add .zsh-theme ext to zsh.nanorc 2018-02-04 12:18:29 -05:00
zshrc.nanorc Adds missing zshrc symlink 2015-09-19 22:21:48 -04:00

***************************************
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 <https://github.com/scopatz/nanorc/issues/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**