Search:  
Gentoo Wiki

TIP_Nano_No_Auto-wrap

GNU nano is designed to be a free replacement for the Pico text editor, part of the Pine email suite from The University of Washington. It aims to "emulate Pico as closely as possible and perhaps include extra functionality".

nano is also the default editor with Gentoo, it is installed by default on a standard Gentoo installation. If you wish to change your default editor to VIM or Emacs, see Changing the default editor.

Contents

Creating a new file

To create a new file foobar.txt start the nano editor as follows:

nano foobar.txt

Opening an existing file

To open an existing file foobar.txt start the nano editor as follows:

nano foobar.txt

Disable word wrapping

To disable word wrapping, start the nano editor using the -w flag:

nano -w foobar.txt

If you do not want to always add the -w flag, you can edit /etc/nanorc or ~/.nanorc and add the following line:

set nowrap

For more information about how you can configure /etc/nanorc, you can {codeline|man nanorc}.

Note: If you are using bash as your shell, you can also alias nano as follows in ~/.bashrc:
alias nano="nano -w"

Links

Retrieved from "http://www.gentoo-wiki.info/Nano#Disable_word_wrapping"

Last modified: Sun, 07 Sep 2008 23:14:00 +0000 Hits: 7,325