nano, Do Not Wrap Text

GNU nano is my favorite text editor while I’m on console. However, there’s one thing about nano which annoys me: automatic text wrapping!

Hopefully, there are two simple ways to overcome this. By using either -w command-line argument, or set nowrap configuration command within the file ~/.nanorc.

1. The temporary solution by using -w command-line argument, which should be used each time you run nano:

$ nano -w /path/to/file

2. The permanent solution by setting off automatic text wrapping using the configuration command set nowrap, in the ~/.nanorc file:

~/.nanorc
1
set nowrap

Note: If the file doesn’t exist, you should create it first:

$ touch ~/.nanorc