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 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 morespace
189          Deprecated option since it has become  the  default  setting.   When
190          needed, use unset emptyline instead.
191
192       set mouse
193          Enable  mouse  support, if available for your system.  When enabled,
194          mouse clicks can be used to place the cursor, set the mark  (with  a
195          double  click), and execute shortcuts.  The mouse will work in the X
196          Window System, and on the console when gpm  is  running.   Text  can
197          still be selected through dragging by holding down the Shift key.
198
199       set multibuffer
200          When  reading  in a file with ^R, insert it into a new buffer by de‐
201          fault.
202
203       set noconvert
204          Don't convert files from DOS/Mac format.
205
206       set nohelp
207          Don't display the two help lines at the bottom of the screen.
208
209       set nonewlines
210          Don't automatically add a newline when a text does not end with one.
211          (This can cause you to save non-POSIX text files.)
212
213       set nopauses
214          Obsolete option.  Ignored.
215
216       set nowrap
217          Deprecated  option  since  it  has become the default setting.  When
218          needed, use unset breaklonglines instead.
219
220       set numbercolor [bold,][italic,]fgcolor,bgcolor
221          Use this color combination for line numbers.  See set titlecolor for
222          more details.
223
224       set operatingdir directory
225          nano  will only read and write files inside directory and its subdi‐
226          rectories.  Also, the current directory is changed to here, so files
227          are  inserted from this directory.  By default, the operating direc‐
228          tory feature is turned off.
229
230       set positionlog
231          Save the cursor position of files  between  editing  sessions.   The
232          cursor  position  is  remembered  for  the  200 most-recently edited
233          files.
234
235       set preserve
236          Preserve the XON and XOFF keys (^Q and ^S).
237
238       set promptcolor [bold,][italic,]fgcolor,bgcolor
239          Use this color combination for the prompt bar.  (When this option is
240          not  specified,  the colors of the title bar are used.)  See set ti‐
241          tlecolor for more details.
242
243       set punct "characters"
244          Set the characters treated as closing  punctuation  when  justifying
245          paragraphs.   This may not include blank characters.  Only the spec‐
246          fified closing punctuation, optionally followed by closing  brackets
247          (see brackets), can end sentences.  The default value is "!.?".
248
249       set quickblank
250          Make  status-bar messages disappear after 1 keystroke instead of af‐
251          ter 20.  Note that options constantshow and minibar override this.
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 your keyboard to
263          work properly, please report a  bug.   Using  this  option  disables
264          nano's mouse support.
265
266       set rebinddelete
267          Interpret  the  Delete  and  Backspace keys differently so that both
268          Backspace and Delete work properly.  You should only use this option
269          when on your system either Backspace acts like Delete or Delete acts
270          like Backspace.
271
272       set regexp
273          Do regular-expression searches by default.  Regular  expressions  in
274          nano are of the extended type (ERE).
275
276       set saveonexit
277          Save  a  changed  buffer  automatically  on exit (^X); don't prompt.
278          (The old form of this option, set tempfile, is deprecated.)
279
280       set scrollercolor fgcolor,bgcolor
281          Use this color combination for the indicator alias "scrollbar".  (On
282          terminal  emulators  that  link to a libvte older than version 0.55,
283          using a background color here does not work correctly.)  See set ti‐
284          tlecolor for more details.
285
286       set selectedcolor [bold,][italic,]fgcolor,bgcolor
287          Use  this  color  combination for selected text.  See set titlecolor
288          for more details.
289
290       set showcursor
291          Put the cursor on the highlighted item in the file browser,  to  aid
292          braille users.
293
294       set smarthome
295          Make the Home key smarter.  When Home is pressed anywhere but at the
296          very beginning of non-whitespace characters on a  line,  the  cursor
297          will  jump to that beginning (either forwards or backwards).  If the
298          cursor is already at that position, it will jump to the true  begin‐
299          ning of the line.
300
301       set smooth
302          Deprecated  option  since  it  has become the default setting.  When
303          needed, use unset jumpyscrolling instead.
304
305       set softwrap
306          Display lines that exceed the screen's width  over  multiple  screen
307          lines.  (You can make this soft-wrapping occur at whitespace instead
308          of rudely at the screen's edge, by using also set atblanks.)
309
310       set speller "program [argument ...]"
311          Use the given program to do spell checking and  correcting,  instead
312          of using the built-in corrector that calls hunspell(1) or spell(1).
313
314       set spotlightcolor [bold,][italic,]fgcolor,bgcolor
315          Use this color combination for highlighting a search match.  The de‐
316          fault value is black,lightyellow.   See  set  titlecolor  for  valid
317          color names.
318
319       set stateflags
320          Use the top-right corner of the screen for showing some state flags:
321          I when auto-indenting, M when the mark is on, L  when  hard-wrapping
322          (breaking  long  lines),  R when recording a macro, and S when soft-
323          wrapping.  When the buffer is modified, a star (*)  is  shown  after
324          the filename in the center of the title bar.
325
326       set statuscolor [bold,][italic,]fgcolor,bgcolor
327          Use  this  color combination for the status bar.  See set titlecolor
328          for more details.
329
330       set stripecolor [bold,][italic,]fgcolor,bgcolor
331          Use this color combination for the vertical guiding stripe.  See set
332          titlecolor for more details.
333
334       set suspendable
335          Allow nano to be suspended (with ^Z by default).
336
337       set tabsize number
338          Use  a  tab  size  of  number  columns.  The value of number must be
339          greater than 0.  The default value is 8.
340
341       set tabstospaces
342          Convert typed tabs to spaces.
343
344       set titlecolor [bold,][italic,]fgcolor,bgcolor
345          Use this color combination for the title bar.  Valid names  for  the
346          foreground  and  background  colors  are: red, green, blue, magenta,
347          yellow, cyan, white, and black.  Each of these eight  names  may  be
348          prefixed  with  the  word  light  to  get a brighter version of that
349          color.  On terminal emulators that can do at least 256 colors, other
350          valid  (but  unprefixable) color names are: pink, purple, mauve, la‐
351          goon, mint, lime, peach, orange, latte, and normal --  where  normal
352          means  the default foreground or background color.  Either "fgcolor"
353          or ",bgcolor" may be left out, and the pair may be preceded by  bold
354          and/or  italic  (separated  by commas) to get a bold and/or slanting
355          typeface, if your terminal can do those.
356
357       set trimblanks
358          Remove trailing whitespace from wrapped lines when  automatic  hard-
359          wrapping occurs or when text is justified.
360
361       set unix
362          Save  a  file  by default in Unix format.  This overrides nano's de‐
363          fault behavior of saving a file in the format that  it  had.   (This
364          option has no effect when you also use set noconvert.)
365
366       set whitespace "characters"
367          Set  the  two  characters  used to indicate the presence of tabs and
368          spaces.  They must be single-column characters.   The  default  pair
369          for a UTF-8 locale is "»⋅", and for other locales ">.".
370
371       set wordbounds
372          Detect  word  boundaries differently by treating punctuation charac‐
373          ters as parts of words.
374
375       set wordchars "characters"
376          Specify which other  characters  (besides  the  normal  alphanumeric
377          ones)  should  be considered as parts of words.  When using this op‐
378          tion, you probably want to unset wordbounds.
379
380       set zap
381          Let an unmodified Backspace or Delete erase the marked  region  (in‐
382          stead of a single character, and without affecting the cutbuffer).
383
384

SYNTAX HIGHLIGHTING

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

REBINDING KEYS

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

FILES

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

SEE ALSO

995       nano(1)
996
997       https://nano-editor.org/cheatsheet.html
998              An overview of the default key bindings.
999
1000
1001
1002March 2021                       version 5.6.1                       NANORC(5)
Impressum