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       -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       -q (--quiet)
153              Do  not  report  errors  in  the  nanorc file and ask them to be
154              acknowledged by pressing Enter at startup.
155
156       -r cols (--fill=cols)
157              Wrap lines at column cols.  If this value is 0 or less, wrapping
158              will  occur at the width of the screen less cols columns, allow‐
159              ing the wrap point to vary along with the width of the screen if
160              the screen is resized.  The default value is -8.
161
162       -s prog (--speller=prog)
163              Enable alternative spell checker command.
164
165       -t (--tempfile)
166              Always save changed buffer without prompting.  Same as Pico's -t
167              option.
168
169       -u (--undo)
170              Enable experimental generic-purpose undo code.  By default,  the
171              undo and redo shortcuts are Meta-U and Meta-E, respectively.
172
173       -v (--view)
174              View file (read only) mode.
175
176       -w (--nowrap)
177              Disable wrapping of long lines.
178
179       -x (--nohelp)
180              Disable help screen at bottom of editor.
181
182       -z (--suspend)
183              Enable suspend ability.
184
185       -$ (--softwrap)
186              Enable 'soft wrapping'.  nano will attempt to display the entire
187              contents of a line, even if it is longer than the screen  width.
188              Since  '$'  normally refers to a variable in the Unix shell, you
189              should specify this option last when using other  options  (e.g.
190              'nano -wS$') or pass it separately (e.g. 'nano -wS -$').
191
192       -a, -b, -e, -f, -g, -j
193              Ignored, for compatibility with Pico.
194
195

INITIALIZATION FILE

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

NOTES

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

BUGS

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

HOMEPAGE

228       http://www.nano-editor.org/
229
230

SEE ALSO

232       nanorc(5)
233       /usr/share/doc/nano/ (or equivalent on your system)
234

AUTHOR

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