3 Settings to Improve Your Productivity with Nano

Posted on March 8, 2025 by Bruno G. Ciccarino
Tags: , ,

Recently, I discovered that nano is configurable (I know, hard to imagine). I used to use vim for everything, but I abandoned vim due to some bugs (I won’t go into details) and switched to emacs. However, I’ve been preferring nano for smaller scripts and decided to learn a bit about it. Even though nano is a simple editor, it is highly configurable and you can set it up exactly the way you like.

Locating the Configuration File

First, you need to find nano’s configuration file, which is normally located at /etc/nanorc.

I moved it to my home directory because I don’t want to have to go to /etc every time I want to make a change.

The exact command was:

cp -i /etc/nanorc ~/.nanorc

Customizing nano

If you’re already familiar with .conf files, you’ll appreciate nano’s configuration syntax since it is the same.

In the nano configuration file, look for the line: set linenumbers and uncomment it.

Another option I really like is setting the tab spacing.

Search for the line: set tabsize in your configuration file and specify the spacing you prefer (I personally set it to 2 spaces).

Lastly, another configuration I really like is the one that lets you work with multiple buffers. Uncomment the line: set multibuffer

More Configurations

If you want to see more configurations for nano, here is my current nanorc: https://gist.github.com/bgcicca/4a95c3bfb4be72f42e89a4e72a222aba