Blog of Raivo Laanemets

Stories about web development, consulting and personal computers.

Nano configuration

On 2014-03-13

Nano is my favorite console-based text editor. It is by default available on many Linux distributions and OS X. However, the default configuration uses tabs and does not show line numbers. It can easily be fixed by a ~/.nanorc configuration file. The description of possible options can be found from here. Below is the list of options I have put into my file:

set const
set nowrap
set tabsize 4
set tabstospaces
set autoindent

Here:

  • set const will enable current line/column info display on the status line;
  • set nowrap disables line wrapping;
  • set tabsize 4 makes tabs take 4 columns;
  • set tabstospaces turns typed tabs into spaces;
  • set autoindent enables automatic indentation.