1NANORC(5)                            2021"                           NANORC(5)
2
3
4

NAME

6       nanorc - GNU nano's configuration file
7
8

DESCRIPTION

10       The  nanorc  files  contain  the default settings for nano, a small and
11       friendly editor.  During startup, if --rcfile is not given,  nano  will
12       read  two  files: first the system-wide settings, from /etc/nanorc (the
13       exact path might be different on your system), and then  the  user-spe‐
14       cific    settings,    either   from   ~/.nanorc   or   from   $XDG_CON‐
15       FIG_HOME/nano/nanorc or from ~/.config/nano/nanorc,  whichever  is  en‐
16       countered  first.  If --rcfile is given, nano will read just the speci‐
17       fied settings file.
18
19

NOTICE

21       Since version 4.0, nano by default:
22
23           • does not automatically hard-wrap lines that become overlong,
24           • includes the line below the title bar in the editing area,
25           • does linewise (smooth) scrolling.
26
27       To get the old, Pico behavior back, you can use set breaklonglines, set
28       emptyline, and set jumpyscrolling.
29
30

OPTIONS

32       The  configuration  file  accepts  a  series of set and unset commands,
33       which can be used to configure nano on startup without  using  command-
34       line  options.   Additionally, there are some commands to define syntax
35       highlighting and to rebind keys -- see the  two  separate  sections  on
36       those.   nano  reads  one  command per line.  All commands and keywords
37       should be written in lowercase.
38
39       Options in nanorc files take precedence over nano's defaults, and  com‐
40       mand-line  options override nanorc settings.  Also, options that do not
41       take an argument are unset by default.  So using the unset  command  is
42       only  needed  when wanting to override a setting of the system's nanorc
43       file in your own nanorc.  Options that take an argument cannot  be  un‐
44       set.
45
46       Quotes  inside  the characters  parameters below should not be escaped.
47       The last double quote on the line will be seen as the closing quote.
48
49       The supported commands and arguments are:
50
51       set afterends
52          Make Ctrl+Right and Ctrl+Delete stop at word ends instead of  begin‐
53          nings.
54
55       set allow_insecure_backup
56          When  backing up files, allow the backup to succeed even if its per‐
57          missions can't be (re)set due to  special  OS  considerations.   You
58          should NOT enable this option unless you are sure you need it.
59
60       set atblanks
61          When  soft  line  wrapping  is  enabled, make it wrap lines at blank
62          characters (tabs and spaces) instead of always at the  edge  of  the
63          screen.
64
65       set autoindent
66          Automatically indent a newly created line to the same number of tabs
67          and/or spaces as the previous line (or as the next line if the  pre‐
68          vious line is the beginning of a paragraph).
69
70       set backup
71          When  saving  a  file, create a backup file by adding a tilde (~) to
72          the file's name.
73
74       set backupdir directory
75          Make and keep not just one backup file, but make and keep a uniquely
76          numbered  one every time a file is saved -- when backups are enabled
77          with set backup or --backup or -B.  The uniquely numbered files  are
78          stored in the specified directory.
79
80       set boldtext
81          Use bold instead of reverse video for the title bar, status bar, key
82          combos, function tags, line numbers, and selected text.  This can be
83          overridden by setting the options titlecolor, statuscolor, keycolor,
84          functioncolor, numbercolor, and selectedcolor.
85
86       set bookstyle
87          When justifying, treat any line that starts with whitespace  as  the
88          beginning of a paragraph (unless auto-indenting is on).
89
90       set brackets "characters"
91          Set the characters treated as closing brackets when justifying para‐
92          graphs.  This may not include blank characters.  Only closing  punc‐
93          tuation  (see set punct), optionally followed by the specified clos‐
94          ing brackets, can end sentences.  The default value is ""')>]}".
95
96       set breaklonglines
97          Automatically hard-wrap the current line when it becomes overlong.
98
99       set casesensitive
100          Do case-sensitive searches by default.
101
102       set constantshow
103          Constantly display the cursor position  in  the  status  bar.   This
104          overrides the option quickblank.
105
106       set cutfromcursor
107          Use  cut-from-cursor-to-end-of-line  by  default, instead of cutting
108          the whole line.
109
110       set emptyline
111          Do not use the line below the title bar, leaving it entirely blank.
112
113       set errorcolor [bold,][italic,]fgcolor,bgcolor
114          Use this color combination for the status bar when an error  message
115          is displayed.  The default value is brightwhite,red.  See set title‐
116          color for valid color names.
117
118       set fill number
119          Set the target width for justifying and automatic  hard-wrapping  at
120          this  number  of  columns.  If the value is 0 or less, wrapping will
121          occur at the width of the screen minus number columns, allowing  the
122          wrap  point to vary along with the width of the screen if the screen
123          is resized.  The default value is -8.
124
125       set functioncolor [bold,][italic,]fgcolor,bgcolor
126          Use this color combination for the concise function descriptions  in
127          the  two help lines at the bottom of the screen.  See set titlecolor
128          for more details.
129
130       set guidestripe number
131          Draw a vertical stripe at the given column, to help judge the  width
132          of  the  text.   (The  color  of  the stripe can be changed with set
133          stripecolor.)
134
135       set historylog
136          Save the last hundred search strings and replacement strings and ex‐
137          ecuted commands, so they can be easily reused in later sessions.
138
139       set indicator
140          Display  a "scrollbar" on the righthand side of the edit window.  It
141          shows the position of the viewport in the buffer and how much of the
142          buffer is covered by the viewport.
143
144       set jumpyscrolling
145          Scroll the buffer contents per half-screen instead of per line.
146
147       set keycolor [bold,][italic,]fgcolor,bgcolor
148          Use  this  color  combination for the shortcut key combos in the two
149          help lines at the bottom of the screen.  See set titlecolor for more
150          details.
151
152       set linenumbers
153          Display  line  numbers to the left of the text area.  (Any line with
154          an anchor additionally gets a mark in the margin.)
155
156       set locking
157          Enable vim-style lock-files for when editing files.
158
159       set magic
160          When neither the file's name nor its first line give a clue, try us‐
161          ing  libmagic to determine the applicable syntax.  (Calling libmagic
162          can be relatively time consuming.  It is therefore not done  by  de‐
163          fault.)
164
165       set matchbrackets "characters"
166          Specify  the  opening  and  closing  brackets  that  can be found by
167          bracket searches.  This may not include blank characters.  The open‐
168          ing  set  must come before the closing set, and the two sets must be
169          in the same order.  The default value is "(<[{)>]}".
170
171       set minibar
172          Suppress the title bar and instead show information about  the  cur‐
173          rent buffer at the bottom of the screen, in the space for the status
174          bar.  In this "minibar" the file name is shown on the left, followed
175          by  an  asterisk  if the buffer has been modified.  On the right are
176          displayed the current line and column number, the code of the  char‐
177          acter  under  the cursor (in Unicode format: U+xxxx), the same flags
178          as are shown by set stateflags, and a percentage that expresses  how
179          far  the  cursor is into the file (linewise).  When a file is loaded
180          or saved, and also when switching between  buffers,  the  number  of
181          lines  in  the buffer is displayed after the file name.  This number
182          is cleared upon the  next  keystroke,  or  replaced  with  an  [i/n]
183          counter  when  multiple buffers are open.  The line plus column num‐
184          bers and the character code are displayed only when set constantshow
185          is  used,  and  can be toggled on and off with M-C.  The state flags
186          are displayed only when set stateflags is used.
187
188       set minicolor [bold,][italic,]fgcolor,bgcolor
189          Use this color combination for the minibar.  (When  this  option  is
190          not  specified,  the colors of the title bar are used.)  See set ti‐
191          tlecolor for more details.
192
193       set mouse
194          Enable mouse support, if available for your system.   When  enabled,
195          mouse  clicks  can be used to place the cursor, set the mark (with a
196          double click), and execute shortcuts.  The mouse will work in the  X
197          Window  System,  and  on  the console when gpm is running.  Text can
198          still be selected through dragging by holding down the Shift key.
199
200       set multibuffer
201          When reading in a file with ^R, insert it into a new buffer  by  de‐
202          fault.
203
204       set noconvert
205          Don't convert files from DOS/Mac format.
206
207       set nohelp
208          Don't display the two help lines at the bottom of the screen.
209
210       set nonewlines
211          Don't automatically add a newline when a text does not end with one.
212          (This can cause you to save non-POSIX text files.)
213
214       set nowrap
215          Deprecated option since it has become  the  default  setting.   When
216          needed, use unset breaklonglines instead.
217
218       set numbercolor [bold,][italic,]fgcolor,bgcolor
219          Use this color combination for line numbers.  See set titlecolor for
220          more details.
221
222       set operatingdir directory
223          nano will only read and write files inside directory and its  subdi‐
224          rectories.  Also, the current directory is changed to here, so files
225          are inserted from this directory.  By default, the operating  direc‐
226          tory feature is turned off.
227
228       set positionlog
229          Save  the  cursor  position  of files between editing sessions.  The
230          cursor position is  remembered  for  the  200  most-recently  edited
231          files.
232
233       set preserve
234          Preserve the XON and XOFF keys (^Q and ^S).
235
236       set promptcolor [bold,][italic,]fgcolor,bgcolor
237          Use this color combination for the prompt bar.  (When this option is
238          not specified, the colors of the title bar are used.)  See  set  ti‐
239          tlecolor for more details.
240
241       set punct "characters"
242          Set  the  characters  treated as closing punctuation when justifying
243          paragraphs.  This may not include blank characters.  Only the  spec‐
244          fified  closing punctuation, optionally followed by closing brackets
245          (see brackets), can end sentences.  The default value is "!.?".
246
247       set quickblank
248          Make status-bar messages disappear after 1 keystroke instead of  af‐
249          ter 20.  Note that options constantshow and minibar override this.
250
251       set quotestr "regex"
252          Set  the regular expression for matching the quoting part of a line.
253          The default value is  "^([ \t]*([!#%:;>|}]|//))+".   (Note  that  \t
254          stands  for an actual Tab character.)  This makes it possible to re‐
255          justify blocks of quoted text when composing email,  and  to  rewrap
256          blocks of line comments when writing source code.
257
258       set rawsequences
259          Interpret  escape  sequences  directly (instead of asking ncurses to
260          translate them).  If you need this option to get  your  keyboard  to
261          work  properly,  please  report  a  bug.  Using this option disables
262          nano's mouse support.
263
264       set rebinddelete
265          Interpret the Delete and Backspace keys  differently  so  that  both
266          Backspace and Delete work properly.  You should only use this option
267          when on your system either Backspace acts like Delete or Delete acts
268          like Backspace.
269
270       set regexp
271          Do  regular-expression  searches by default.  Regular expressions in
272          nano are of the extended type (ERE).
273
274       set saveonexit
275          Save a changed buffer automatically  on  exit  (^X);  don't  prompt.
276          (The old form of this option, set tempfile, is deprecated.)
277
278       set scrollercolor fgcolor,bgcolor
279          Use this color combination for the indicator alias "scrollbar".  (On
280          terminal emulators that link to a libvte older  than  version  0.55,
281          using a background color here does not work correctly.)  See set ti‐
282          tlecolor for more details.
283
284       set selectedcolor [bold,][italic,]fgcolor,bgcolor
285          Use this color combination for selected text.   See  set  titlecolor
286          for more details.
287
288       set showcursor
289          Put  the  cursor on the highlighted item in the file browser, to aid
290          braille users.
291
292       set smarthome
293          Make the Home key smarter.  When Home is pressed anywhere but at the
294          very  beginning  of  non-whitespace characters on a line, the cursor
295          will jump to that beginning (either forwards or backwards).  If  the
296          cursor  is already at that position, it will jump to the true begin‐
297          ning of the line.
298
299       set softwrap
300          Display lines that exceed the screen's width  over  multiple  screen
301          lines.  (You can make this soft-wrapping occur at whitespace instead
302          of rudely at the screen's edge, by using also set atblanks.)
303
304       set speller "program [argument ...]"
305          Use the given program to do spell checking and  correcting,  instead
306          of using the built-in corrector that calls hunspell(1) or spell(1).
307
308       set spotlightcolor [bold,][italic,]fgcolor,bgcolor
309          Use this color combination for highlighting a search match.  The de‐
310          fault value is black,lightyellow.   See  set  titlecolor  for  valid
311          color names.
312
313       set stateflags
314          Use the top-right corner of the screen for showing some state flags:
315          I when auto-indenting, M when the mark is on, L  when  hard-wrapping
316          (breaking  long  lines),  R when recording a macro, and S when soft-
317          wrapping.  When the buffer is modified, a star (*)  is  shown  after
318          the filename in the center of the title bar.
319
320       set statuscolor [bold,][italic,]fgcolor,bgcolor
321          Use  this  color combination for the status bar.  See set titlecolor
322          for more details.
323
324       set stripecolor [bold,][italic,]fgcolor,bgcolor
325          Use this color combination for the vertical guiding stripe.  See set
326          titlecolor for more details.
327
328       set suspendable
329          Allow nano to be suspended (with ^Z by default).
330
331       set tabsize number
332          Use  a  tab  size  of  number  columns.  The value of number must be
333          greater than 0.  The default value is 8.
334
335       set tabstospaces
336          Convert typed tabs to spaces.
337
338       set titlecolor [bold,][italic,]fgcolor,bgcolor
339          Use this color combination for the title bar.  Valid names  for  the
340          foreground  and  background  colors  are: red, green, blue, magenta,
341          yellow, cyan, white, and black.  Each of these eight  names  may  be
342          prefixed  with  the  word  light  to  get a brighter version of that
343          color.  The word grey or gray may be used as a  synonym  for  light‐
344          black.  On terminal emulators that can do at least 256 colors, other
345          valid (but unprefixable) color names are: pink, purple,  mauve,  la‐
346          goon,  mint,  lime, peach, orange, latte, and normal -- where normal
347          means the default foreground or background color.  Either  "fgcolor"
348          or  ",bgcolor" may be left out, and the pair may be preceded by bold
349          and/or italic (separated by commas) to get a  bold  and/or  slanting
350          typeface, if your terminal can do those.
351
352       set trimblanks
353          Remove  trailing  whitespace from wrapped lines when automatic hard-
354          wrapping occurs or when text is justified.
355
356       set unix
357          Save a file by default in Unix format.  This  overrides  nano's  de‐
358          fault  behavior  of  saving a file in the format that it had.  (This
359          option has no effect when you also use set noconvert.)
360
361       set whitespace "characters"
362          Set the two characters used to indicate the  presence  of  tabs  and
363          spaces.   They  must  be single-column characters.  The default pair
364          for a UTF-8 locale is "»⋅", and for other locales ">.".
365
366       set wordbounds
367          Detect word boundaries differently by treating  punctuation  charac‐
368          ters as parts of words.
369
370       set wordchars "characters"
371          Specify  which  other  characters  (besides  the normal alphanumeric
372          ones) should be considered as parts of words.  When using  this  op‐
373          tion, you probably want to unset wordbounds.
374
375       set zap
376          Let  an  unmodified Backspace or Delete erase the marked region (in‐
377          stead of a single character, and without affecting the cutbuffer).
378
379

SYNTAX HIGHLIGHTING

381       Coloring the different syntactic elements of a file is done via regular
382       expressions  (see  the color command below).  This is inherently imper‐
383       fect, because regular expressions are  not  powerful  enough  to  fully
384       parse  a  file.  Nevertheless, regular expressions can do a lot and are
385       easy to make, so they are a good fit for a small editor like nano.
386
387       All regular expressions in nano are POSIX extended regular expressions.
388       This means that ., ?, *, +, ^, $, and several other characters are spe‐
389       cial.  The period . matches any single character, ? means the preceding
390       item  is  optional,  *  means the preceding item may be matched zero or
391       more times, + means the preceding item must  be  matched  one  or  more
392       times, ^ matches the beginning of a line, and $ the end, \< matches the
393       start of a word, and \> the end, and \s matches a blank.  It also means
394       that lookahead and lookbehind are not possible.  A complete explanation
395       can be found in the manual page of GNU grep: man grep.
396
397       For each kind of file a separate syntax can be defined via the  follow‐
398       ing commands:
399
400       syntax name ["fileregex" ...]
401              Start the definition of a syntax with this name.  All subsequent
402              color and other such commands will be added to this syntax,  un‐
403              til a new syntax command is encountered.
404
405              When nano is run, this syntax will be automatically activated if
406              the current filename matches  the  extended  regular  expression
407              fileregex.   Or  the syntax can be explicitly activated by using
408              the -Y or --syntax command-line option followed by the name.
409
410              The syntax default is special: it takes no  fileregex,  and  ap‐
411              plies  to files that don't match any syntax's regexes.  The syn‐
412              tax none is reserved; specifying it on the command line  is  the
413              same as not having a syntax at all.
414
415       header "regex" ...
416              If  from all defined syntaxes no fileregex matched, then compare
417              this regex (or regexes) against the first line  of  the  current
418              file, to determine whether this syntax should be used for it.
419
420       magic "regex" ...
421              If no fileregex matched and no header regex matched either, then
422              compare this regex (or regexes) against the result  of  querying
423              the  magic database about the current file, to determine whether
424              this syntax should be used for  it.   (This  functionality  only
425              works  when  libmagic  is  installed  on  the system and will be
426              silently ignored otherwise.)
427
428       formatter program [argument ...]
429              Run the given program on the full contents of the  current  buf‐
430              fer.   (The  current  buffer is written out to a temporary file,
431              the program is run on it, and then the temporary  file  is  read
432              back in, replacing the contents of the buffer.)
433
434       linter program [argument ...]
435              Use  the given program to run a syntax check on the current buf‐
436              fer.
437
438       comment "string"
439              Use the given string for commenting and uncommenting lines.   If
440              the  string  contains a vertical bar or pipe character (|), this
441              designates bracket-style comments; for example, "/*|*/" for  CSS
442              files.  The characters before the pipe are prepended to the line
443              and the characters after the pipe are appended at the end of the
444              line.   If  no  pipe  character  is  present, the full string is
445              prepended; for example, "#" for Python files.  If  empty  double
446              quotes  are  specified,  the  comment/uncomment function is dis‐
447              abled; for example, "" for JSON.  The default value is "#".
448
449       tabgives "string"
450              Make the <Tab> key produce the given string.   Useful  for  lan‐
451              guages like Python that want to see only spaces for indentation.
452              This overrides the setting of the tabstospaces option.
453
454       color [bold,][italic,]fgcolor,bgcolor "regex" ...
455              Paint all pieces of text that match the extended regular expres‐
456              sion  regex  with the given foreground and background colors, at
457              least one of which must be specified.  Valid  color  names  are:
458              red, green, blue, magenta, yellow, cyan, white, and black.  Each
459              of these eight names may be prefixed with the word light to  get
460              a  brighter  version  of that color.  On terminal emulators that
461              can do at least 256 colors, other valid (but unprefixable) color
462              names  are:  pink, purple, mauve, lagoon, mint, lime, peach, or‐
463              ange, latte, and normal -- where normal means the default  fore‐
464              ground  or  background color.  The color pair may be preceded by
465              bold and/or italic (separated by commas) to get  a  bold  and/or
466              slanting typeface, if your terminal can do those.
467
468              All coloring commands are applied in the order in which they are
469              specified, which means that later  commands  can  recolor  stuff
470              that was colored earlier.
471
472       icolor [bold,][italic,]fgcolor,bgcolor "regex" ...
473              Same as above, except that the matching is case insensitive.
474
475       color [bold,][italic,]fgcolor,bgcolor start="fromrx" end="torx"
476              Paint  all  pieces  of text whose start matches extended regular
477              expression fromrx and whose end matches extended regular expres‐
478              sion  torx  with  the given foreground and background colors, at
479              least one of which must be specified.  This means that, after an
480              initial instance of fromrx, all text until the first instance of
481              torx will be colored.  This allows syntax highlighting  to  span
482              multiple lines.
483
484       icolor [bold,][italic,]fgcolor,bgcolor start="fromrx" end="torx"
485              Same as above, except that the matching is case insensitive.
486
487       include "syntaxfile"
488              Read  in  self-contained  color  syntaxes from syntaxfile.  Note
489              that syntaxfile may contain only the above commands, from syntax
490              to icolor.
491
492       extendsyntax name command argument ...
493              Extend  the  syntax previously defined as name with another com‐
494              mand.  This allows adding a new color,  icolor,  header,  magic,
495              formatter,  linter,  comment,  or tabgives command to an already
496              defined syntax -- useful when you want  to  slightly  improve  a
497              syntax  defined in one of the system-installed files (which nor‐
498              mally are not writable).
499
500

REBINDING KEYS

502       Key bindings can be changed via the following three commands:
503
504          bind key function menu
505                 Rebinds the given key to the given function in the given menu
506                 (or in all menus where the function exists when all is used).
507
508          bind key "string" menu
509                 Makes  the  given  key  produce the given string in the given
510                 menu (or in all menus where the key exists when all is used).
511                 The  string can consist of text or commands or a mix of them.
512                 (To enter a command into the string,  precede  its  keystroke
513                 with M-V.)
514
515          unbind key menu
516                 Unbinds  the given key from the given menu (or from all menus
517                 where the key exists when all is used).
518
519
520       The format of key should be one of:
521
522          ^X     where X is a Latin letter, or one of several ASCII characters
523                 (@, ], \, ^, _), or the word "Space".  Example: ^C.
524
525          M-X    where X is any ASCII character except [, or the word "Space".
526                 Example: M-8.
527
528          Sh-M-X where X is a Latin letter.   Example:  Sh-M-U.   By  default,
529                 each Meta+letter keystroke does the same as the corresponding
530                 Shift+Meta+letter.  But when any  Shift+Meta  bind  is  made,
531                 that will no longer be the case, for all letters.
532
533          FN     where N is a numeric value from 1 to 24.  Example: F10.  (Of‐
534                 ten, F13 to F24 can be typed as F1 to F12 with Shift.)
535
536          Ins or Del.
537
538       Rebinding ^M (Enter) or ^I (Tab) is probably not a good idea.   Rebind‐
539       ing  ^[  (Esc) is not possible, because its keycode is the starter byte
540       of Meta keystrokes and escape sequences.  Rebinding any  of  the  dedi‐
541       cated  cursor-moving  keys (the arrows, Home, End, PageUp and PageDown)
542       is not possible.  On some terminals it's not possible to rebind ^H (un‐
543       less  --raw  is  used)  because its keycode is identical to that of the
544       Backspace key.
545
546
547       Valid function names to be bound are:
548
549          help
550            Invokes the help viewer.
551
552          cancel
553            Cancels the current command.
554
555          exit
556            Exits from the program (or from the help viewer or file browser).
557
558          writeout
559            Writes the current buffer to disk, asking for a name.
560
561          savefile
562            Writes the current file to disk without prompting.
563
564          insert
565            Inserts a file into the current buffer (at the current cursor  po‐
566            sition), or into a new buffer when option multibuffer is set.
567
568          whereis
569            Starts  a  forward search for text in the current buffer -- or for
570            filenames matching a string  in  the  current  list  in  the  file
571            browser.
572
573          wherewas
574            Starts  a backward search for text in the current buffer -- or for
575            filenames matching a string  in  the  current  list  in  the  file
576            browser.
577
578          findprevious
579            Searches the next occurrence in the backward direction.
580
581          findnext
582            Searches the next occurrence in the forward direction.
583
584          replace
585            Interactively replaces text within the current buffer.
586
587          cut
588            Cuts and stores the current line (or the marked region).
589
590          copy
591            Copies  the  current  line (or the marked region) without deleting
592            it.
593
594          paste
595            Pastes the currently stored text into the current  buffer  at  the
596            current cursor position.
597
598          zap
599            Throws  away the current line (or the marked region).  (This func‐
600            tion is bound by default to <Meta+Delete>.)
601
602          chopwordleft
603            Deletes from the cursor position to the beginning of the preceding
604            word.   (This function is bound by default to <Shift+Ctrl+Delete>.
605            If your terminal produces ^H for <Ctrl+Backspace>,  you  can  make
606            <Ctrl+Backspace>  delete the word to the left of the cursor by re‐
607            binding ^H to this function.)
608
609          chopwordright
610            Deletes from the cursor position to  the  beginning  of  the  next
611            word.  (This function is bound by default to <Ctrl+Delete>.)
612
613          cutrestoffile
614            Cuts all text from the cursor position till the end of the buffer.
615
616          mark
617            Sets  the  mark  at the current position, to start selecting text.
618            Or, when it is set, unsets the mark.
619
620          location
621            Reports the current position of the  cursor  in  the  buffer:  the
622            line,  column,  and  character  positions.   (The old name of this
623            function, 'curpos', is deprecated.)
624
625          wordcount
626            Counts the number of words, lines and characters  in  the  current
627            buffer.
628
629          execute
630            Prompts  for  a  program to execute.  The program's output will be
631            inserted into the current buffer (or into a new buffer when M-F is
632            toggled).
633
634          speller
635            Invokes  a  spell-checking program, either the default hunspell(1)
636            or GNU spell(1), or the one defined by --speller or set speller.
637
638          formatter
639            Invokes a full-buffer-processing program (if the active syntax de‐
640            fines one).
641
642          linter
643            Invokes  a  syntax-checking  program (if the active syntax defines
644            one).
645
646          justify
647            Justifies the current paragraph.  A paragraph is a group  of  con‐
648            tiguous  lines  that, apart from possibly the first line, all have
649            the same indentation.  The beginning of a paragraph is detected by
650            either this lone line with a differing indentation or by a preced‐
651            ing blank line.
652
653          fulljustify
654            Justifies the entire current buffer.
655
656          indent
657            Indents (shifts to the right) the currently marked text.
658
659          unindent
660            Unindents (shifts to the left) the currently marked text.
661
662          comment
663            Comments or uncomments the current line or marked lines, using the
664            comment style specified in the active syntax.
665
666          complete
667            Completes  the  fragment  before  the  cursor to a full word found
668            elsewhere in the current buffer.
669
670          left
671            Goes left one position (in the editor or browser).
672
673          right
674            Goes right one position (in the editor or browser).
675
676          up
677            Goes one line up (in the editor or browser).
678
679          down
680            Goes one line down (in the editor or browser).
681
682          scrollup
683            Scrolls the viewport up one row  (meaning  that  the  text  slides
684            down)  while keeping the cursor in the same text position, if pos‐
685            sible.
686
687          scrolldown
688            Scrolls the viewport down one row (meaning that  the  text  slides
689            up)  while keeping the cursor in the same text position, if possi‐
690            ble.
691
692          center
693            Scrolls the line with the cursor to the middle of the screen.
694
695          prevword
696            Moves the cursor to the beginning of the previous word.
697
698          nextword
699            Moves the cursor to the beginning of the next word.
700
701          home
702            Moves the cursor to the beginning of the current line.
703
704          end
705            Moves the cursor to the end of the current line.
706
707          beginpara
708            Moves the cursor to the beginning of the current paragraph.
709
710          endpara
711            Moves the cursor to the end of the current paragraph.
712
713          prevblock
714            Moves the cursor to the beginning  of  the  current  or  preceding
715            block of text.  (Blocks are separated by one or more blank lines.)
716
717          nextblock
718            Moves the cursor to the beginning of the next block of text.
719
720          pageup
721            Goes up one screenful.
722
723          pagedown
724            Goes down one screenful.
725
726          firstline
727            Goes to the first line of the file.
728
729          lastline
730            Goes to the last line of the file.
731
732          gotoline
733            Goes  to a specific line (and column if specified).  Negative num‐
734            bers count from the end of the file (and end of the line).
735
736          findbracket
737            Moves the cursor to the bracket (or brace  or  parenthesis,  etc.)
738            that  matches  (pairs)  with  the  one  under the cursor.  See set
739            matchbrackets.
740
741          anchor
742            Places an anchor at the current line, or removes it  when  already
743            present.  (An anchor is visible when line numbers are activated.)
744
745          prevanchor
746            Goes to the first anchor before the current line.
747
748          nextanchor
749            Goes to the first anchor after the current line.
750
751          prevbuf
752            Switches to editing/viewing the previous buffer when multiple buf‐
753            fers are open.
754
755          nextbuf
756            Switches to editing/viewing the next buffer when multiple  buffers
757            are open.
758
759          verbatim
760            Inserts the next keystroke verbatim into the file.
761
762          tab
763            Inserts a tab at the current cursor location.
764
765          enter
766            Inserts a new line below the current one.
767
768          delete
769            Deletes the character under the cursor.
770
771          backspace
772            Deletes the character before the cursor.
773
774          recordmacro
775            Starts the recording of keystrokes -- the keystrokes are stored as
776            a macro.  When already recording, the recording is stopped.
777
778          runmacro
779            Replays the keystrokes of the last recorded macro.
780
781          undo
782            Undoes the last performed text  action  (add  text,  delete  text,
783            etc).
784
785          redo
786            Redoes the last undone action (i.e., it undoes an undo).
787
788          refresh
789            Refreshes the screen.
790
791          suspend
792            Suspends  the  editor  (if the suspending function is enabled, see
793            the suspendable toggle item below).
794
795          casesens
796            Toggles whether searching/replacing ignores or respects  the  case
797            of the given characters.
798
799          regexp
800            Toggles  whether searching/replacing uses literal strings or regu‐
801            lar expressions.
802
803          backwards
804            Toggles whether searching/replacing goes forward or backward.
805
806          older
807            Retrieves the previous (earlier) entry at a prompt.
808
809          newer
810            Retrieves the next (later) entry at a prompt.
811
812          flipreplace
813            Toggles between searching for something and replacing something.
814
815          flipgoto
816            Toggles between searching for text and targeting a line number.
817
818          flipexecute
819            Toggles between inserting a file and executing a command.
820
821          flippipe
822            When executing a command, toggles whether the current  buffer  (or
823            marked region) is piped to the command.
824
825          flipnewbuffer
826            Toggles  between  inserting into the current buffer and into a new
827            empty buffer.
828
829          flipconvert
830            When reading in a file, toggles between converting  and  not  con‐
831            verting it from DOS/Mac format.  Converting is the default.
832
833          dosformat
834            When writing a file, switches to writing a DOS format (CR/LF).
835
836          macformat
837            When writing a file, switches to writing a Mac format.
838
839          append
840            When writing a file, appends to the end instead of overwriting.
841
842          prepend
843            When  writing a file, 'prepends' (writes at the beginning) instead
844            of overwriting.
845
846          backup
847            When writing a file, creates a backup of the current file.
848
849          discardbuffer
850            When about to write a file, discard  the  current  buffer  without
851            saving.   (This  function  is  bound  by  default only when option
852            --saveonexit is in effect.)
853
854          browser
855            Starts the file browser (in the Read File and  Write  Out  menus),
856            allowing to select a file from a list.
857
858          gotodir
859            Goes  to  a directory to be specified, allowing to browse anywhere
860            in the filesystem.
861
862          firstfile
863            Goes to the first file in the list when using the file browser.
864
865          lastfile
866            Goes to the last file in the list when using the file browser.
867
868          nohelp
869            Toggles the presence of the two-line list of key bindings  at  the
870            bottom of the screen.  (This toggle is special: it is available in
871            all menus except the help viewer and the linter.  All further tog‐
872            gles are available in the main menu only.)
873
874          constantshow
875            Toggles  the  constant  display  of  the current line, column, and
876            character positions.
877
878          softwrap
879            Toggles the displaying of overlong lines on multiple screen lines.
880
881          linenumbers
882            Toggles the display of line numbers in front of the text.
883
884          whitespacedisplay
885            Toggles the showing of whitespace.
886
887          nosyntax
888            Toggles syntax highlighting.
889
890          smarthome
891            Toggles the smartness of the Home key.
892
893          autoindent
894            Toggles whether a newly created line will contain the same  amount
895            of leading whitespace as the preceding line -- or as the next line
896            if the preceding line is the beginning of a paragraph.
897
898          cutfromcursor
899            Toggles whether cutting text will cut the whole line or just  from
900            the current cursor position to the end of the line.
901
902          breaklonglines
903            Toggles  whether long lines will be hard-wrapped to the next line.
904            (The old name of this function, 'nowrap', is deprecated.)
905
906          tabstospaces
907            Toggles whether typed tabs will be converted to spaces.
908
909          mouse
910            Toggles mouse support.
911
912          suspendable
913            Toggles whether the suspend keystroke (^Z by default)  will  actu‐
914            ally  suspend  the  editor.  (The old name of this function, 'sus‐
915            pendenable', is deprecated.)
916
917
918       Valid menu sections are:
919
920          main
921            The main editor window where text is entered and edited.
922
923          help
924            The help-viewer menu.
925
926          search
927            The search menu (AKA whereis).
928
929          replace
930            The 'search to replace' menu.
931
932          replacewith
933            The 'replace with' menu, which comes up after 'search to replace'.
934
935          yesno
936            The 'yesno' menu, where the Yes/No/All/Cancel question is asked.
937
938          gotoline
939            The 'goto line (and column)' menu.
940
941          writeout
942            The 'write file' menu.
943
944          insert
945            The 'insert file' menu.
946
947          browser
948            The 'file browser' menu, for selecting a file to be opened or  in‐
949            serted or written to.
950
951          whereisfile
952            The 'search for a file' menu in the file browser.
953
954          gotodir
955            The 'go to directory' menu in the file browser.
956
957          execute
958            The menu for inserting the output from an external command, or for
959            filtering the buffer (or the marked region)  through  an  external
960            command,  or for executing one of several tools.  (The old form of
961            this menu name, 'extcmd', is deprecated.)
962
963          spell
964            The menu of the integrated spell checker where the user can edit a
965            misspelled word.
966
967          linter
968            The  linter  menu,  which  allows jumping through the linting mes‐
969            sages.
970
971          all
972            A special name that encompasses all menus.  For bind it means  all
973            menus where the specified function exists; for unbind it means all
974            menus where the specified key exists.
975
976

FILES

978       /etc/nanorc
979              System-wide configuration file.
980
981       ~/.nanorc or $XDG_CONFIG_HOME/nano/nanorc or ~/.config/nano/nanorc
982              Per-user configuration file.
983
984       /usr/share/nano/*
985              Syntax definitions for the syntax coloring of common file  types
986              (and for less common file types in the extra/ subdirectory).
987
988

SEE ALSO

990       nano(1)
991
992       https://nano-editor.org/cheatsheet.html
993              An overview of the default key bindings.
994
995
996
997June                             version 5.8                         NANORC(5)
Impressum