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

SYNTAX HIGHLIGHTING

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

REBINDING KEYS

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

FILES

962       /etc/nanorc
963              System-wide configuration file.
964
965       ~/.nanorc or $XDG_CONFIG_HOME/nano/nanorc or ~/.config/nano/nanorc
966              Per-user configuration file.
967
968       /usr/share/nano/*
969              Syntax definitions for the syntax coloring of common file  types
970              (and for less common file types in the extra/ subdirectory).
971
972

SEE ALSO

974       nano(1)
975
976       https://nano-editor.org/cheatsheet.html
977              An overview of the default key bindings.
978
979
980
981October 2020                      version 5.3                        NANORC(5)
Impressum