Skip to content

Instantly share code, notes, and snippets.

@mojoaxel
Last active December 10, 2015 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mojoaxel/4381004 to your computer and use it in GitHub Desktop.
Save mojoaxel/4381004 to your computer and use it in GitHub Desktop.
Improve syntax-highlighting for the nano text editor
#!/bin/sh
### Improve syntax-highlighting for the nano editor.
### by mojoaxel <dev@wunschik.net>
### NOT TESTED YET!! USE WITH CARE!!
### http://www.if-not-true-then-false.com/2009/tuning-nano-text-editor-with-nanorc/
### download sytax setting for javascript
cd /usr/share/nano/
sudo wget http://nanosyntax.googlecode.com/svn/trunk/syntax-nanorc/js.nanorc
cd ~
### copy the nano sample config
cp /usr/share/doc/nano/examples/nanorc.sample.gz /tmp/
cd /tmp/
gunzip nanorc.sample.gz
cp nanorc.sample /etc/nanorc
rm nanorc.sample
cd ~
### add the following lines to /etc/nanorc
echo include "/usr/share/nano/js.nanorc" >> /etc/nanorc
cd ~
### improve html support
cd /usr/share/nano/
mv html.nanorc html.nanorc.backup
wget https://raw.github.com/scopatz/nanorc/master/html.nanorc
cd ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment