1NANO(1) General Commands Manual NANO(1)
2
3
4
6 nano - Nano's ANOther editor, an enhanced free Pico clone
7
8
10 nano [OPTIONS] [[+LINE,COLUMN] FILE]...
11
12
14 This manual page briefly documents the nano command.
15
16 nano is a small, free and friendly editor which aims to replace Pico,
17 the default editor included in the non-free Pine package. Rather than
18 just copying Pico's look and feel, nano also implements some missing
19 (or disabled by default) features in Pico, such as "search and replace"
20 and "go to line and column number".
21
22
24 +LINE,COLUMN
25 Places cursor at line number LINE and column number COLUMN (at
26 least one of which must be specified) on startup, instead of the
27 default of line 1, column 1.
28
29 -? Same as -h (--help).
30
31 -A (--smarthome)
32 Make the Home key smarter. When Home is pressed anywhere but at
33 the very beginning of non-whitespace characters on a line, the
34 cursor will jump to that beginning (either forwards or back‐
35 wards). If the cursor is already at that position, it will jump
36 to the true beginning of the line.
37
38 -B (--backup)
39 When saving a file, back up the previous version of it to the
40 current filename suffixed with a ~.
41
42 -C dir (--backupdir=dir)
43 Set the directory where nano puts unique backup files if file
44 backups are enabled.
45
46 -D (--boldtext)
47 Use bold text instead of reverse video text.
48
49 -E (--tabstospaces)
50 Convert typed tabs to spaces.
51
52 -F (--multibuffer)
53 Enable multiple file buffers, if available.
54
55 -H (--historylog)
56 Log search and replace strings to ~/.nano_history, so they can
57 be retrieved in later sessions, if nanorc support is available.
58
59 -I (--ignorercfiles)
60 Don't look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support
61 is available.
62
63 -K (--rebindkeypad)
64 Interpret the numeric keypad keys so that they all work prop‐
65 erly. You should only need to use this option if they don't, as
66 mouse support won't work properly with this option enabled.
67
68 -L (--nonewlines)
69 Don't add newlines to the ends of files.
70
71 -N (--noconvert)
72 Disable automatic conversion of files from DOS/Mac format.
73
74 -O (--morespace)
75 Use the blank line below the titlebar as extra editing space.
76
77 -Q str (--quotestr=str)
78 Set the quoting string for justifying. The default is
79 "^([ \t]*[#:>\|}])+" if extended regular expression support is
80 available, or "> " otherwise. Note that \t stands for a Tab.
81
82 -R (--restricted)
83 Restricted mode: don't read or write to any file not specified
84 on the command line; read any nanorc files; allow suspending;
85 allow a file to be appended to, prepended to, or saved under a
86 different name if it already has one; or use backup files or
87 spell checking. Also accessible by invoking nano with any name
88 beginning with 'r' (e.g. "rnano").
89
90 -S (--smooth)
91 Enable smooth scrolling. Text will scroll line-by-line, instead
92 of the usual chunk-by-chunk behavior.
93
94 -T cols (--tabsize=cols)
95 Set the size (width) of a tab to cols columns. The value of
96 cols must be greater than 0. The default value is 8.
97
98 -U (--quickblank)
99 Do quick statusbar blanking. Statusbar messages will disappear
100 after 1 keystroke instead of 25. Note that -c overrides this.
101
102 -V (--version)
103 Show the current version number and exit.
104
105 -W (--wordbounds)
106 Detect word boundaries more accurately by treating punctuation
107 characters as part of a word.
108
109 -Y str (--syntax=str)
110 Specify a specific syntax highlighting from the nanorc to use,
111 if available.
112
113 -c (--const)
114 Constantly show the cursor position. Note that this overrides
115 -U.
116
117 -d (--rebinddelete)
118 Interpret the Delete key differently so that both Backspace and
119 Delete work properly. You should only need to use this option
120 if Backspace acts like Delete on your system.
121
122 -h (--help)
123 Show a summary of command line options and exit.
124
125 -i (--autoindent)
126 Indent new lines to the previous line's indentation. Useful
127 when editing source code.
128
129 -k (--cut)
130 Enable cut from cursor to end of line.
131
132 -l (--nofollow)
133 If the file being edited is a symbolic link, replace the link
134 with a new file instead of following it. Good for editing files
135 in /tmp, perhaps?
136
137 -m (--mouse)
138 Enable mouse support, if available for your system. When
139 enabled, mouse clicks can be used to place the cursor, set the
140 mark (with a double click), and execute shortcuts. The mouse
141 will work in the X Window System, and on the console when gpm is
142 running.
143
144 -o dir (--operatingdir=dir)
145 Set operating directory. Makes nano set up something similar to
146 a chroot.
147
148 -p (--preserve)
149 Preserve the XON and XOFF sequences (^Q and ^S) so they will be
150 caught by the terminal.
151
152 -r cols (--fill=cols)
153 Wrap lines at column cols. If this value is 0 or less, wrapping
154 will occur at the width of the screen less cols columns, allow‐
155 ing the wrap point to vary along with the width of the screen if
156 the screen is resized. The default value is -8.
157
158 -s prog (--speller=prog)
159 Enable alternative spell checker command.
160
161 -t (--tempfile)
162 Always save changed buffer without prompting. Same as Pico's -t
163 option.
164
165 -v (--view)
166 View file (read only) mode.
167
168 -w (--nowrap)
169 Disable wrapping of long lines.
170
171 -x (--nohelp)
172 Disable help screen at bottom of editor.
173
174 -z (--suspend)
175 Enable suspend ability.
176
177 -a, -b, -e, -f, -g, -j
178 Ignored, for compatibility with Pico.
179
180
182 nano will read initialization files in the following order:
183 SYSCONFDIR/nanorc, then ~/.nanorc. Please see nanorc(5) and the exam‐
184 ple file nanorc.sample, both of which should be provided with nano.
185
186
188 If no alternative spell checker command is specified on the command
189 line or in one of the nanorc files, nano will check the SPELL environ‐
190 ment variable for one.
191
192 In some cases nano will try to dump the buffer into an emergency file.
193 This will happen mainly if nano receives a SIGHUP or SIGTERM or runs
194 out of memory. It will write the buffer into a file named nano.save if
195 the buffer didn't have a name already, or will add a ".save" suffix to
196 the current filename. If an emergency file with that name already
197 exists in the current directory, it will add ".save" plus a number
198 (e.g. ".save.1") to the current filename in order to make it unique.
199 In multibuffer mode, nano will write all the open buffers to their
200 respective emergency files.
201
202
204 Please send any comments or bug reports to nano@nano-editor.org.
205
206 The nano mailing list is available from nano-devel@gnu.org.
207
208 To subscribe, email to nano-devel-request@gnu.org with a subject of
209 "subscribe".
210
211
213 http://www.nano-editor.org/
214
215
217 nanorc(5)
218 /usr/share/doc/nano/ (or equivalent on your system)
219
221 Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for
222 details). This manual page was originally written by Jordi Mallach
223 <jordi@gnu.org>, for the Debian system (but may be used by others).
224
225
226
227August 23, 2007 version 2.0.0 NANO(1)