Go to the first, previous, next, last section, table of contents.
GNU nano
is a small and friendly text editor. Besides basic
text editing, nano
offers many extra features like an
interactive search and replace, goto line number, auto-indentation,
feature toggles, internationalization support, and filename tab
completion.
nano
[GNU long option] [option] +LINE [ file ... ]
The original goal for nano
was a complete bug-for-bug compatible
emulation of Pico, but consistency is now a slightly higher priority.
There is a flag to implement (nearly) complete Pico emulation, (option -p
or GNU long option --pico). This can also be toggled from within
nano
by typing Meta-P. See section Pico Compatibility, for more
info.
Email bug reports to [email protected].
nano
takes the following options from the command line:
-T [num, --tabsize=[num]
-
Set the displayed tab length to [num] columns.
-R, --regexp
-
Turns on regular expression search and search/replace.
-V, --version
-
Print the version number and copyright and quit.
-c, --const
-
Constantly display the cursor posititon and line number on the statusbar.
-h, --help
-
Print the usage and exit.
-i, --autoindent
-
Automatically indent new lines to the same number of spaces and tabs as
the previous line.
-k, --cut
-
Makes ^K cut from the current cursor position to the end of the current
line.
-l, --nofollow
-
When writing files, if the given file is a symbolic link it is removed
and a new file is created.
-m, --mouse
-
Enables the use of the mouse to select text (currently only useful for
running under the X window system).
-p, --pico
-
Emulate Pico as closely as possible, sacrificing consistency for correct
emulation. See section Pico Compatibility, for more info.
-r [#cols], --fill=[#cols].
-
Wrap lines at column #cols. By default this is the width of the screen,
less eight.
-s [prog], --speller=[prog]
-
Invoke [prog] as the spell checker. By default,
nano
uses its
own interactive spell checker that requires the spell
program be
installed on your system.
-t, --tempfile
-
Do not ask whether or not to save the current contents of the file when
exiting, assume yes. This is most useful when using
nano
as the
composer of a mailer program.
@anchor{Expert Mode}
-x, --nohelp
-
In Expert Mode, the Shortcut Lists will not appear at the bottom of the
screen. This affects the location of the statusbar as well, as in Expert
Mode it is located at the very bottom of the editor.
Note: When accesing the help system, Expert Mode is temporarily disabled
to display the help system navigation keys.
-v, --view
-
Do not allow the contents of the file to be altered. Note that this
flag should NOT be used in place of correct file permissions to implement
a read-only file.
-w, --nowrap
-
Do not wrap long lines at any length. This option overrides any value for
-r.
-z, --suspend
-
Enable suspend ability of
nano
using the system's suspend
keystroke (usually ^Z).
+LINE
-
Start at line number LINE instead of the default of line 1.
Go to the first, previous, next, last section, table of contents.