Add Nano tool - user-friendly text editor
[tomato.git] / release / src / router / nano / doc / man / nano.1
blob692143175b6d1866a47dc39b2f147d2789b8400f
1 .\" Hey, EMACS: -*- nroff -*-
2 .\" Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3 .\" 2008, 2009 Free Software Foundation, Inc.
4 .\"
5 .\" This document is dual-licensed.  You may distribute and/or modify it
6 .\" under the terms of either of the following licenses:
7 .\"
8 .\" * The GNU General Public License, as published by the Free Software
9 .\"   Foundation, version 3 or (at your option) any later version.  You
10 .\"   should have received a copy of the GNU General Public License
11 .\"   along with this program.  If not, see
12 .\"   <http://www.gnu.org/licenses/>.
13 .\"
14 .\" * The GNU Free Documentation License, as published by the Free
15 .\"   Software Foundation, version 1.2 or (at your option) any later
16 .\"   version, with no Invariant Sections, no Front-Cover Texts, and no
17 .\"   Back-Cover Texts.  You should have received a copy of the GNU Free
18 .\"   Documentation License along with this program.  If not, see
19 .\"   <http://www.gnu.org/licenses/>.
20 .\"
21 .\" $Id: nano.1 4502 2010-04-14 21:55:39Z astyanax $
22 .TH NANO 1 "version 2.2.0" "November 30, 2009"
23 .\" Please adjust this date whenever revising the manpage.
24 .\"
26 .SH NAME
27 nano \- Nano's ANOther editor, an enhanced free Pico clone
29 .SH SYNOPSIS
30 .B nano
31 .I [OPTIONS]\ [[\+LINE,COLUMN]\ FILE]...
32 .br
34 .SH DESCRIPTION
35 This manual page briefly documents the \fBnano\fP command.
36 .PP
37 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
38 .\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
39 .\" respectively.
40 \fBnano\fP is a small, free and friendly editor which aims to replace
41 Pico, the default editor included in the non-free Pine package.  Rather
42 than just copying Pico's look and feel, \fBnano\fP also implements some
43 missing (or disabled by default) features in Pico, such as "search and
44 replace" and "go to line and column number".
46 .SH OPTIONS
47 .TP
48 .B \+\fILINE\fP,\fICOLUMN\fP
49 Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
50 (at least one of which must be specified) on startup, instead of the
51 default of line 1, column 1.
52 .TP
53 .B \-?
54 Same as \fB-h (\-\-help)\fP.
55 .TP
56 .B \-A (\-\-smarthome)
57 Make the Home key smarter.  When Home is pressed anywhere but at the
58 very beginning of non-whitespace characters on a line, the cursor will
59 jump to that beginning (either forwards or backwards).  If the cursor is
60 already at that position, it will jump to the true beginning of the
61 line.
62 .TP
63 .B \-B (\-\-backup)
64 When saving a file, back up the previous version of it to the current
65 filename suffixed with a ~.  
66 .TP
67 .B \-C \fIdir\fP (\-\-backupdir=\fIdir\fP)
68 Set the directory where \fBnano\fP puts unique backup files if file
69 backups are enabled.
70 .TP
71 .B \-D (\-\-boldtext)
72 Use bold text instead of reverse video text.
73 .TP
74 .B \-E (\-\-tabstospaces)
75 Convert typed tabs to spaces.
76 .TP
77 .B \-F (\-\-multibuffer)
78 Enable multiple file buffers, if available.
79 .TP
80 .B \-H (\-\-historylog)
81 Log search and replace strings to \fI~/.nano_history\fP, so they can be
82 retrieved in later sessions, if \fInanorc\fP support is available.
83 .TP
84 .B \-I (\-\-ignorercfiles)
85 Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if
86 \fInanorc\fP support is available.
87 .TP
88 .B \-K (\-\-rebindkeypad)
89 Interpret the numeric keypad keys so that they all work properly.  You
90 should only need to use this option if they don't, as mouse support
91 won't work properly with this option enabled.
92 .TP
93 .B \-L (\-\-nonewlines)
94 Don't add newlines to the ends of files.
95 .TP
96 .B \-N (\-\-noconvert)
97 Disable automatic conversion of files from DOS/Mac format.
98 .TP
99 .B \-O (\-\-morespace)
100 Use the blank line below the titlebar as extra editing space.
102 .B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
103 Set the quoting string for justifying.  The default is
104 "\fI^([\ \\t]*[#:>\\|}])+\fP" if extended regular expression support is
105 available, or "\fI>\ \fP" otherwise.  Note that \fI\\t\fP stands for a
106 Tab.
108 .B \-R (\-\-restricted)
109 Restricted mode: don't read or write to any file not specified on the
110 command line; read any \fInanorc\fP files; allow suspending; allow a
111 file to be appended to, prepended to, or saved under a different name if
112 it already has one; or use backup files or spell checking.  Also
113 accessible by invoking \fBnano\fP with any name beginning with 'r' (e.g.
114 "rnano").
116 .B \-S (\-\-smooth)
117 Enable smooth scrolling.  Text will scroll line-by-line, instead of the
118 usual chunk-by-chunk behavior.
120 .B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
121 Set the size (width) of a tab to \fIcols\fP columns.  The value of
122 \fIcols\fP must be greater than 0.  The default value is 8.
124 .B \-U (\-\-quickblank)
125 Do quick statusbar blanking.  Statusbar messages will disappear after 1
126 keystroke instead of 25.  Note that \fB-c\fP overrides this.
128 .B \-V (\-\-version)
129 Show the current version number and exit.
131 .B \-W (\-\-wordbounds)
132 Detect word boundaries more accurately by treating punctuation
133 characters as part of a word.
135 .B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
136 Specify a specific syntax highlighting from the \fInanorc\fP to use, if
137 available.
139 .B \-c (\-\-const)
140 Constantly show the cursor position.  Note that this overrides \fB-U\fP.
142 .B \-d (\-\-rebinddelete)
143 Interpret the Delete key differently so that both Backspace and Delete
144 work properly.  You should only need to use this option if Backspace
145 acts like Delete on your system.
147 .B \-h (\-\-help)
148 Show a summary of command line options and exit.
150 .B \-i (\-\-autoindent)
151 Indent new lines to the previous line's indentation.  Useful when
152 editing source code.
154 .B \-k (\-\-cut)
155 Enable cut from cursor to end of line.
157 .B \-l (\-\-nofollow)
158 If the file being edited is a symbolic link, replace the link with
159 a new file instead of following it.  Good for editing files in
160 \fI/tmp\fP, perhaps?
162 .B \-m (\-\-mouse)
163 Enable mouse support, if available for your system.  When enabled, mouse
164 clicks can be used to place the cursor, set the mark (with a double
165 click), and execute shortcuts.  The mouse will work in the X Window
166 System, and on the console when gpm is running.
168 .B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
169 Set operating directory.  Makes \fBnano\fP set up something similar to a
170 chroot.
172 .B \-p (\-\-preserve)
173 Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
174 by the terminal.
176 .B \-q (\-\-quiet)
177 Do not report errors in the \fInanorc\fP file and ask them to be
178 acknowledged by pressing Enter at startup.
180 .B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
181 Wrap lines at column \fIcols\fP.  If this value is 0 or less, wrapping
182 will occur at the width of the screen less \fIcols\fP columns, allowing
183 the wrap point to vary along with the width of the screen if the screen
184 is resized.  The default value is \-8.
186 .B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
187 Enable alternative spell checker command.
189 .B \-t (\-\-tempfile)
190 Always save changed buffer without prompting.  Same as Pico's \fB-t\fP
191 option.
193 .B \-u (\-\-undo)
194 Enable experimental generic-purpose undo code.  By default, the undo and redo
195 shortcuts are Meta-U and Meta-E, respectively.
197 .B \-v (\-\-view)
198 View file (read only) mode.
200 .B \-w (\-\-nowrap)
201 Disable wrapping of long lines.
203 .B \-x (\-\-nohelp)
204 Disable help screen at bottom of editor.
206 .B \-z (\-\-suspend)
207 Enable suspend ability.
209 .B \-$ (\-\-softwrap)
210 Enable 'soft wrapping'.  \fBnano\fP will attempt to display the entire
211 contents of a line, even if it is longer than the screen width.  Since
212 \&'$' normally refers to a variable in the Unix shell, you should specify
213 this option last when using other options (e.g. 'nano \-wS$') or pass it
214 separately (e.g. 'nano \-wS \-$').
216 .B \-a, \-b, \-e, \-f, \-g, \-j
217 Ignored, for compatibility with Pico.
219 .SH INITIALIZATION FILE
220 \fBnano\fP will read initialization files in the following order:
221 \fISYSCONFDIR/nanorc\fP, then \fI~/.nanorc\fP.  Please see
222 \fBnanorc(5)\fP and the example file \fBnanorc.sample\fP, both of which
223 should be provided with \fBnano\fP.
225 .SH NOTES
226 If no alternative spell checker command is specified on the command
227 line or in one of the \fInanorc\fP files, \fBnano\fP will check the
228 \fBSPELL\fP environment variable for one.
230 In some cases \fBnano\fP will try to dump the buffer into an emergency
231 file.  This will happen mainly if \fBnano\fP receives a SIGHUP or
232 SIGTERM or runs out of memory.  It will write the buffer into a file
233 named \fInano.save\fP if the buffer didn't have a name already, or will
234 add a ".save" suffix to the current filename.  If an emergency file with
235 that name already exists in the current directory, it will add ".save"
236 plus a number (e.g. ".save.1") to the current filename in order to make
237 it unique.  In multibuffer mode, \fBnano\fP will write all the open
238 buffers to their respective emergency files.
240 .SH BUGS
241 Please send any comments or bug reports to \fBnano@nano-editor.org\fP.
243 The \fBnano\fP mailing list is available from \fBnano-devel@gnu.org\fP.
245 To subscribe, email to \fBnano-devel-request@gnu.org\fP with a subject
246 of "subscribe".
248 .SH HOMEPAGE
249 http://www.nano-editor.org/
251 .SH SEE ALSO
252 .PD 0
254 \fBnanorc\fP(5)
256 \fI/usr/share/doc/nano/\fP (or equivalent on your system)
258 .SH AUTHOR
259 Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
260 \fITHANKS\fP for details).  This manual page was originally written by
261 Jordi Mallach <jordi@gnu.org>, for the Debian system (but may be used by
262 others).