1NANO(1)                     General Commands Manual                    NANO(1)
2
3
4

NAME

6       nano - Nano's ANOther editor, an enhanced free Pico clone
7
8

SYNOPSIS

10       nano [OPTIONS] [[+LINE,COLUMN] FILE]...
11
12

DESCRIPTION

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

OPTIONS

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       -P (--poslog)
78              Log & read location of cursor position.
79
80       -Q str (--quotestr=str)
81              Set   the   quoting  string  for  justifying.   The  default  is
82              "^([ \t]*[#:>\|}])+" if extended regular expression  support  is
83              available, or "> " otherwise.  Note that \t stands for a Tab.
84
85       -R (--restricted)
86              Restricted  mode:  don't read or write to any file not specified
87              on the command line; read any nanorc  files;  allow  suspending;
88              allow  a  file to be appended to, prepended to, or saved under a
89              different name if it already has one; or  use  backup  files  or
90              spell  checking.  Also accessible by invoking nano with any name
91              beginning with 'r' (e.g.  "rnano").
92
93       -S (--smooth)
94              Enable smooth scrolling.  Text will scroll line-by-line, instead
95              of the usual chunk-by-chunk behavior.
96
97       -T cols (--tabsize=cols)
98              Set  the  size  (width)  of a tab to cols columns.  The value of
99              cols must be greater than 0.  The default value is 8.
100
101       -U (--quickblank)
102              Do quick statusbar blanking.  Statusbar messages will  disappear
103              after 1 keystroke instead of 25.  Note that -c overrides this.
104
105       -V (--version)
106              Show the current version number and exit.
107
108       -W (--wordbounds)
109              Detect  word  boundaries more accurately by treating punctuation
110              characters as part of a word.
111
112       -Y str (--syntax=str)
113              Specify a specific syntax highlighting from the nanorc  to  use,
114              if available.
115
116       -c (--const)
117              Constantly  show  the cursor position.  Note that this overrides
118              -U.
119
120       -d (--rebinddelete)
121              Interpret the Delete key differently so that both Backspace  and
122              Delete  work  properly.  You should only need to use this option
123              if Backspace acts like Delete on your system.
124
125       -h (--help)
126              Show a summary of command line options and exit.
127
128       -i (--autoindent)
129              Indent new lines to the  previous  line's  indentation.   Useful
130              when editing source code.
131
132       -k (--cut)
133              Enable cut from cursor to end of line.
134
135       -l (--nofollow)
136              If  the  file  being edited is a symbolic link, replace the link
137              with a new file instead of following it.  Good for editing files
138              in /tmp, perhaps?
139
140       -m (--mouse)
141              Enable  mouse  support,  if  available  for  your  system.  When
142              enabled, mouse clicks can be used to place the cursor,  set  the
143              mark  (with  a  double click), and execute shortcuts.  The mouse
144              will work in the X Window System, and on the console when gpm is
145              running.
146
147       -o dir (--operatingdir=dir)
148              Set operating directory.  Makes nano set up something similar to
149              a chroot.
150
151       -p (--preserve)
152              Preserve the XON and XOFF sequences (^Q and ^S) so they will  be
153              caught by the terminal.
154
155       -q (--quiet)
156              Do  not  report  errors  in  the  nanorc file and ask them to be
157              acknowledged by pressing Enter at startup.
158
159       -r cols (--fill=cols)
160              Wrap lines at column cols.  If this value is 0 or less, wrapping
161              will  occur at the width of the screen less cols columns, allow‐
162              ing the wrap point to vary along with the width of the screen if
163              the screen is resized.  The default value is -8.
164
165       -s prog (--speller=prog)
166              Enable alternative spell checker command.
167
168       -t (--tempfile)
169              Always save changed buffer without prompting.  Same as Pico's -t
170              option.
171
172       -u (--undo)
173              Enable experimental generic-purpose undo code.  By default,  the
174              undo and redo shortcuts are Meta-U and Meta-E, respectively.
175
176       -v (--view)
177              View file (read only) mode.
178
179       -w (--nowrap)
180              Disable wrapping of long lines.
181
182       -x (--nohelp)
183              Disable help screen at bottom of editor.
184
185       -z (--suspend)
186              Enable suspend ability.
187
188       -$ (--softwrap)
189              Enable 'soft wrapping'.  nano will attempt to display the entire
190              contents of a line, even if it is longer than the screen  width.
191              Since  '$'  normally refers to a variable in the Unix shell, you
192              should specify this option last when using other  options  (e.g.
193              'nano -wS$') or pass it separately (e.g. 'nano -wS -$').
194
195       -a, -b, -e, -f, -g, -j
196              Ignored, for compatibility with Pico.
197
198

INITIALIZATION FILE

200       nano   will   read   initialization   files  in  the  following  order:
201       SYSCONFDIR/nanorc, then ~/.nanorc.  Please see nanorc(5) and the  exam‐
202       ple file nanorc.sample, both of which should be provided with nano.
203
204

NOTES

206       If  no  alternative  spell  checker command is specified on the command
207       line or in one of the nanorc files, nano will check the SPELL  environ‐
208       ment variable for one.
209
210       In  some cases nano will try to dump the buffer into an emergency file.
211       This will happen mainly if nano receives a SIGHUP or  SIGTERM  or  runs
212       out of memory.  It will write the buffer into a file named nano.save if
213       the buffer didn't have a name already, or will add a ".save" suffix  to
214       the  current  filename.   If  an  emergency file with that name already
215       exists in the current directory, it will  add  ".save"  plus  a  number
216       (e.g.  ".save.1")  to  the current filename in order to make it unique.
217       In multibuffer mode, nano will write all  the  open  buffers  to  their
218       respective emergency files.
219
220

BUGS

222       Please send any comments or bug reports to nano@nano-editor.org.
223
224       The nano mailing list is available from nano-devel@gnu.org.
225
226       To  subscribe,  email  to  nano-devel-request@gnu.org with a subject of
227       "subscribe".
228
229

HOMEPAGE

231       http://www.nano-editor.org/
232
233

SEE ALSO

235       nanorc(5)
236       /usr/share/doc/nano/ (or equivalent on your system)
237

AUTHOR

239       Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and  THANKS  for
240       details).   This  manual  page  was originally written by Jordi Mallach
241       <jordi@gnu.org>, for the Debian system (but may be used by others).
242
243
244
245November 30, 2009                version 2.2.0                         NANO(1)
Impressum