Linux User Group of Mauritius Promoting open source software in our beautiful island

15Sep/093

nano configs

Like most of you who don't like to get into those religious wars about editors of emac vs vi, we tend to prefer to use nano, simple, and light!

The side of peace :).

Screenshot

But after using nano sometimes, you soon begin to miss those features which you used to have in other editors, e.g syntax highlighting or tabspace etc.

No need to worry lil hippie, nano has these abilities 🙂 you don't need to envy those unsexy editors out there anymore.

Here's my default nano configuration which you might want to use.

~/.nanorc

set tabsize 4
set autoindent
set nowrap
include "/usr/local/share/nano/c.nanorc"
include "/usr/local/share/nano/perl.nanorc"
include "/usr/local/share/nano/sh.nanorc"
include "/usr/local/share/nano/html.nanorc"
include "/usr/local/share/nano/php.nanorc"
include "/usr/local/share/nano/php2.nanorc"

Since am on FreeBSD the synthax highlighting files are located in /usr/local/share/nano, if you are on linux, you might wanna look in /usr/share/nano/

You  can find more syntax highlighting config files here

This is just a simple configuration which will set your tabspace to 4, allow auto indentation, no line wrapping and some syntax highlight 😀 the only things that a use will ever need out of an editor.

Please don't rant that nano can't do magical stuffs :p it is an editor and nothing more [unlike some other things which claims to be editors :p].

+selven

Posted by Selven

Comments (3) Trackbacks (0)
  1. nice one… will be useful.. 🙂

  2. I was wondering if it is possible to enable color/syntax highlighting in nano.
    Was feeling bored with the black & white nano.
    Nice colors (R B Y G) 🙂

  3. Nice tip!, nano is my everyday lifesaver 😛


Leave a comment

No trackbacks yet.