GithubHelp home page GithubHelp logo

nanorc's Introduction

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 [email protected]: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

Acknowledgement

Some of these files are derived from the original nano release [Project] [Repository]

nanorc's People

Contributors

andreadejangrande avatar astronautlevel2 avatar cirku17 avatar coffeetableespresso avatar creekpld avatar dbkaplun avatar desertpunk avatar divinity76 avatar elofu17 avatar esler avatar gmcclins avatar htdebeer avatar ingria avatar jboero avatar jodizzle avatar lopho avatar mariuszs avatar mcnesium avatar mobluse avatar mormy avatar nl6720 avatar paulinder avatar rasa avatar scopatz avatar shmuelie avatar simon-v avatar sinaa avatar starlitghost avatar thomasr avatar yochem avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.