1NANORC(5)                     File Formats Manual                    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 bold,white,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 filename 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 filename.  This number is
182          cleared upon the next keystroke, or replaced with an  [i/n]  counter
183          when  multiple  buffers  are open.  The line plus column numbers and
184          the character code are displayed only when set constantshow is used,
185          and  can  be  toggled on and off with M-C.  The state flags are dis‐
186          played 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 option constantshow overrides this.  When option
250          minibar or zero is in effect, quickblank makes a  message  disappear
251          after 0.8 seconds instead of after the default 1.5 seconds.
252
253       set quotestr "regex"
254          Set  the regular expression for matching the quoting part of a line.
255          The default value is  "^([ \t]*([!#%:;>|}]|//))+".   (Note  that  \t
256          stands  for an actual Tab character.)  This makes it possible to re‐
257          justify blocks of quoted text when composing email,  and  to  rewrap
258          blocks of line comments when writing source code.
259
260       set rawsequences
261          Interpret  escape  sequences  directly, instead of asking ncurses to
262          translate them.  (If you need this option to get some keys  to  work
263          properly,  it  means  that the terminfo terminal description that is
264          used does not fully match the  actual  behavior  of  your  terminal.
265          This  can happen when you ssh into a BSD machine, for example.)  Us‐
266          ing this option disables nano's mouse support.
267
268       set rebinddelete
269          Interpret the Delete and Backspace keys  differently  so  that  both
270          Backspace and Delete work properly.  You should only use this option
271          when on your system either Backspace acts like Delete or Delete acts
272          like Backspace.
273
274       set regexp
275          Do  regular-expression  searches by default.  Regular expressions in
276          nano are of the extended type (ERE).
277
278       set saveonexit
279          Save a changed buffer automatically  on  exit  (^X);  don't  prompt.
280          (The old form of this option, set tempfile, is deprecated.)
281
282       set scrollercolor fgcolor,bgcolor
283          Use this color combination for the indicator alias "scrollbar".  (On
284          terminal emulators that link to a libvte older  than  version  0.55,
285          using a background color here does not work correctly.)  See set ti‐
286          tlecolor for more details.
287
288       set selectedcolor [bold,][italic,]fgcolor,bgcolor
289          Use this color combination for selected text.   See  set  titlecolor
290          for more details.
291
292       set showcursor
293          Put the cursor on the highlighted item in the file browser, and show
294          the cursor in the help viewer, to aid braille users and people  with
295          poor vision.
296
297       set smarthome
298          Make the Home key smarter.  When Home is pressed anywhere but at the
299          very beginning of non-whitespace characters on a  line,  the  cursor
300          will  jump to that beginning (either forwards or backwards).  If the
301          cursor is already at that position, it will jump to the true  begin‐
302          ning of the line.
303
304       set softwrap
305          Display  lines  that  exceed the screen's width over multiple screen
306          lines.  (You can make this soft-wrapping occur at whitespace instead
307          of rudely at the screen's edge, by using also set atblanks.)
308
309       set speller "program [argument ...]"
310          Use  the  given program to do spell checking and correcting, instead
311          of using the built-in corrector that calls hunspell(1) or spell(1).
312
313       set spotlightcolor [bold,][italic,]fgcolor,bgcolor
314          Use this color combination for highlighting a search match.  The de‐
315          fault  value  is  black,lightyellow.   See  set titlecolor for valid
316          color names.
317
318       set stateflags
319          Use the top-right corner of the screen for showing some state flags:
320          I  when  auto-indenting, M when the mark is on, L when hard-wrapping
321          (breaking long lines), R when recording a macro, and  S  when  soft-
322          wrapping.   When  the  buffer is modified, a star (*) is shown after
323          the filename in the center of the title bar.
324
325       set statuscolor [bold,][italic,]fgcolor,bgcolor
326          Use this color combination for the status bar.  See  set  titlecolor
327          for more details.
328
329       set stripecolor [bold,][italic,]fgcolor,bgcolor
330          Use this color combination for the vertical guiding stripe.  See set
331          titlecolor for more details.
332
333       set suspendable
334          Obsolete option; ignored.  Suspension is enabled by default,  reach‐
335          able via ^T^Z.  (If you want a plain ^Z to suspend nano, add bind ^Z
336          suspend main to your nanorc.)
337
338       set tabsize number
339          Use a tab size of number columns.   The  value  of  number  must  be
340          greater than 0.  The default value is 8.
341
342       set tabstospaces
343          Convert  each  typed tab to spaces -- to the number of spaces that a
344          tab at that position would take up.
345
346       set titlecolor [bold,][italic,]fgcolor,bgcolor
347          Use this color combination for the title bar.  Valid names  for  the
348          foreground  and  background  colors  are: red, green, blue, magenta,
349          yellow, cyan, white, and black.  Each of these eight  names  may  be
350          prefixed  with  the  word  light  to  get a brighter version of that
351          color.  The word grey or gray may be used as a  synonym  for  light‐
352          black.  On terminal emulators that can do at least 256 colors, other
353          valid (but unprefixable) color names are: pink, purple,  mauve,  la‐
354          goon,  mint, lime, peach, orange, latte, rosy, beet, plum, sea, sky,
355          slate, teal, sage, brown, ocher, sand, tawny,  brick,  crimson,  and
356          normal  --  where  normal means the default foreground or background
357          color.  On such emulators, the color may  also  be  specified  as  a
358          three-digit hexadecimal number prefixed with #, with the digits rep‐
359          resenting the amounts of red, green, and blue,  respectively.   This
360          tells  nano  to select from the available palette the color that ap‐
361          proximates the given values.
362
363          Either "fgcolor" or ",bgcolor" may be left out, and the pair may  be
364          preceded  by  bold and/or italic (separated by commas) to get a bold
365          and/or slanting typeface, if your terminal can do those.
366
367       set trimblanks
368          Remove trailing whitespace from wrapped lines when  automatic  hard-
369          wrapping occurs or when text is justified.
370
371       set unix
372          Save  a  file  by default in Unix format.  This overrides nano's de‐
373          fault behavior of saving a file in the format that  it  had.   (This
374          option has no effect when you also use set noconvert.)
375
376       set whitespace "characters"
377          Set  the  two  characters  used to indicate the presence of tabs and
378          spaces.  They must be single-column characters.   The  default  pair
379          for a UTF-8 locale is "»⋅", and for other locales ">.".
380
381       set wordbounds
382          Detect  word  boundaries differently by treating punctuation charac‐
383          ters as parts of words.
384
385       set wordchars "characters"
386          Specify which other  characters  (besides  the  normal  alphanumeric
387          ones)  should  be considered as parts of words.  When using this op‐
388          tion, you probably want to unset wordbounds.
389
390       set zap
391          Let an unmodified Backspace or Delete erase the marked  region  (in‐
392          stead of a single character, and without affecting the cutbuffer).
393
394       set zero
395          Hide  all elements of the interface (title bar, status bar, and help
396          lines) and use all rows of the terminal for showing the contents  of
397          the buffer.  The status bar appears only when there is a significant
398          message, and disappears after 1.5 seconds  or  upon  the  next  key‐
399          stroke.   With  M-Z  the  title  bar plus status bar can be toggled.
400          With M-X the help lines.
401
402

SYNTAX HIGHLIGHTING

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

REBINDING KEYS

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

FILES

1009       /etc/nanorc
1010              System-wide configuration file.
1011
1012       ~/.nanorc or $XDG_CONFIG_HOME/nano/nanorc or ~/.config/nano/nanorc
1013              Per-user configuration file.
1014
1015       /usr/share/nano/*
1016              Syntax  definitions for the syntax coloring of common file types
1017              (and for less common file types in the extra/ subdirectory).
1018
1019

SEE ALSO

1021       nano(1)
1022
1023       https://nano-editor.org/cheatsheet.html
1024              An overview of the default key bindings.
1025
1026
1027
1028December 2021                     version 6.0                        NANORC(5)
Impressum