This manual page briefly documents GNU nano's rcfile.

       nano  is  a small, free and friendly editor which aims to replace Pico,
       the default editor included in the non-free Pine package.  Rather  than
       just  copying  Pico's  look and feel, nano also implements some missing
       (or disabled by default) features in Pico, such as "search and replace"
       and "go to line and column number".

       The  nanorc file contains the default settings for nano.  It should not
       be in DOS or Mac format.  During startup, nano will first read its sys-
       tem-wide  settings  from SYSCONFDIR/nanorc, and then user-specific set-
       tings from ~/.nanorc.

       The configuration file accepts a series  of  set  and  unset  commands,
       which  can  be used to configure nano on startup without using the com-
       mand line options.  Additionally, the syntax, color,  and  icolor  key-
       words  are  used to define syntax highlighting rules for different text
       patterns.  nano will read one command per line.

       Options in nanorc files take precedence over nano's defaults, and  com-
       mand line options override nanorc settings.  Also, options are unset by
       default, except for those that take arguments.

       Quotes inside string parameters don't have to  be  escaped  with  back-
       slashes.   The  last  double quote in the string will be treated as its
       end.  For example, for the brackets option, ""')>]}" will match  ",  ',
       ), >, ], and }.

       The supported commands and arguments are:

       set/unset allow_insecure_backup
          When  backing up files, allow the backup to succeed even if its per-
          missions can't be (re)set due to  special  OS  considerations.   You
          should NOT enable this option unless you are sure you need it.

       set/unset autoindent
          Use auto-indentation.

       set/unset backup
          Create backup files in filename~.

       set backupdir directory
          Set  the directory where nano puts unique backup files if file back-
          ups are enabled.

       set/unset backwards
          Do backwards searches by default.

       set/unset boldtext
          Constantly display the cursor position in the status bar.

       set/unset cut
          Use cut to end of line by default.

       set fill n
          Wrap  lines at column number n.  If n is 0 or less, the maximum line
          length will be the screen width less n columns.  The  default  value
          is -8.

       set/unset historylog
          Enable   ~/.nano_history   for  saving  and  reading  search/replace

       set matchbrackets string
          Set the opening and closing brackets that can be  found  by  bracket
          searches.   They  cannot  contain  blank characters.  The former set
          must come before the latter set, and both must be in the same order.
          The default value is "(<[{)>]}".

       set/unset morespace
          Use the blank line below the titlebar as extra editing space.

       set/unset mouse
          Enable  mouse  support, if available for your system.  When enabled,
          mouse clicks can be used to place the cursor, set the mark  (with  a
          double  click), and execute shortcuts.  The mouse will work in the X
          Window System, and on the console when gpm is running.

       set/unset multibuffer
          Allow inserting files into their own buffers.

       set/unset noconvert
          Don't convert files from DOS/Mac format.

       set/unset nofollow
          Don't follow symlinks when writing files.

       set/unset nohelp
          Don't display the help lists at the bottom of the screen.

       set/unset nonewlines
          Don't add newlines to the ends of files.

       set/unset nowrap
          Don't wrap text at all.

       set operatingdir directory
          nano will only read and write files inside directory and its  subdi-
          rectories.  Also, the current directory is changed to here, so files
          are inserted from this diractory.  By default, the operating  direc-
          tory feature is turned off.

       set/unset preserve

       set/unset quickblank
          Do quick statusbar  blanking.   Statusbar  messages  will  disappear
          after 1 keystroke instead of 25.

       set quotestr string
          The  email-quote  string,  used  to justify email-quoted paragraphs.
          This is an extended regular expression if your system supports them,
          otherwise    a    literal    string.     The    default   value   is
          "^([ \t]*[#:>\|}])+" if you have extended  regular  expression  sup-
          port,  or  "> "  otherwise.  Note that '\t' stands for a literal Tab

       set/unset rebinddelete
          Interpret the Delete key differently  so  that  both  Backspace  and
          Delete  work  properly.   You should only need to use this option if
          Backspace acts like Delete on your system.

       set/unset rebindkeypad
          Interpret the numeric keypad keys so that they  all  work  properly.
          You should only need to use this option if they don't, as mouse sup-
          port won't work properly with this option enabled.

       set/unset regexp
          Do extended regular expression searches by default.

       set/unset smarthome
          Make the Home key smarter.  When Home is pressed anywhere but at the
          very  beginning  of  non-whitespace characters on a line, the cursor
          will jump to that beginning (either forwards or backwards).  If  the
          cursor  is already at that position, it will jump to the true begin-
          ning of the line.

       set/unset smooth
          Use smooth scrolling by default.

       set/unset softwrap
          Enable soft line wrapping for easier viewing of very long lones.

       set speller spellprog
          Use spelling checker spellprog instead of the  built-in  one,  which
          calls spell.

       set/unset suspend
          Allow nano to be suspended.

       set tabsize n
          Use a tab size of n columns.  The value of n must be greater than 0.
          The default value is 8.

       set/unset tabstospaces
          Convert typed tabs to spaces.

       set/unset tempfile
          Set the two characters used to display the first characters of  tabs
          and spaces.  They must be single-column characters.

       set/unset wordbounds
          Detect word boundaries more accurately by treating punctuation char-
          acters as parts of words.

       syntax str ["fileregex" ... ]
          Defines a syntax named str which can be activated via the  -Y/--syn-
          tax  command  line option, or will be automatically activated if the
          current filename matches the extended regular expression  fileregex.
          All following color and icolor statements will apply to syntax until
          a new syntax is defined.

          The none syntax is reserved; specifying it on the  command  line  is
          the  same as not having a syntax at all.  The default syntax is spe-
          cial: it takes no fileregex, and applies to files that  don't  match
          any other syntax's fileregex.

       color fgcolor,bgcolor regex ...
          For  the  currently defined syntax, display all expressions matching
          the extended regular expression regex with foreground color  fgcolor
          and  background  color bgcolor, at least one of which must be speci-
          fied.  Legal colors for foreground and background color are:  white,
          black, red, blue, green, yellow, magenta, and cyan.  You may use the
          prefix "bright" to force a stronger color highlight  for  the  fore-
          ground.   If  your  terminal supports transparency, not specifying a
          bgcolor tells nano to attempt to use a transparent background.

       icolor fgcolor,bgcolor regex ...
          Same as above, except that the expression matching is case  insensi-

       color fgcolor,bgcolor start="sr" end="er"
          Display expressions which start with the extended regular expression
          sr and end with the extended regular expression er  with  foreground
          color  fgcolor  and  background color bgcolor, at least one of which
          must be specified.  This allows syntax highlighting to span multiple
          lines.  Note that all subsequent instances of sr after an initial sr
          is found will be highlighted until the first instance of er.

       icolor fgcolor,bgcolor start="sr" end="er"
          Same as above, except that the expression matching is case  insensi-

       include syntaxfile
          Read  in  self-contained  color syntaxes from syntaxfile.  Note that
          syntaxfile can only contain syntax, color, and icolor commands.

       Key bindings may be reassigned via the following commands:

       bind key function menu
              Rebinds the key key to a new function named function in the con-

          Invoke the help menu.

          Cancel the current command.

          Exit from the program.

          Write the current buffer to disk.

          Justify the current text.

          Insert a file into the current buffer (or into  a  new  buffer  when
          multibuffer is enabled).

          Search for text in the current buffer.

          Repeat the last search command.

       up Move up in the editor or browser.

          Move down in the editor or browser.

          Move left in the editor or browser.

          Move right in the editor or browser.

          Cut the current line of text and store it.

          Copy the currently stored text into the current buffer position.

          Show the current line, column, word positions in the file.

          Move to the first line of the file.

          Move to the last line of the file.

          Move to a specific line (and column if specified).

          Un-indent the currently marked text (shift to the left).

          Move the cursor to the beginning of the next word.

          Move the cursor to the beginning of the previous word.

          Move the cursor to the beginning of the current line.

          Move the cursor to the end of the current line.

          Move the cursor to the beginning of the current paragraph.

          Move the cursor to the end of the current paragraph.

          Move  the  cursor to the matching bracket (brace, parenthesis, etc.)
          of the one under the cursor.

          Scroll up one line of text from the current position.

          Scroll down one line of text from the current position.

          Switch to editing/viewing the previous buffer when using multibuffer

          Switch  to  editing/viewing  the  next buffer when using multibuffer

          Insert the next character verbatim into the file.

          Insert a tab at the current cursor location.

          Insert a new line below the current one.

          Delete the character under the cursor.

          Justify the entire current file.

          Suspend the editor (if the suspend  function  is  enabled,  see  the
          "suspendenable" entry below).

          Toggle case sensitivity in searching (search/replace menus only).

          Toggle  whether  searching/replacing  is based on literal strings or
          regular expressions.

          Show the previous history entry in the prompt menus (e.g. search).

          Show the next history entry in the prompt menus (e.g. search).

          Switch back to searching instead of replacing.

          Search for files matching a string in the file browser  (reading  or
          writing files).

          When writing a file, switch to writing a DOS format (CR/LF).

          When writing a file, switch to writing a Mac format.

          When writing a file, append to the end instead of overwriting.

          When  writing  a file, 'prepend' (write at the beginning) instead of

          When writing a file, create a backup of the current file.

          Move to the first file when using the file browser (reading or writ-
          ing files).

          Move  to the last file when using the file browser (reading or writ-
          ing files).

          Toggle showing/hiding the two-line list of key bindings at the  bot-
          tom of the screen.

          Constantly display the current line, column, word positions.

          Toggle whether new lines will contain the same amount of  whitespace
          as the line above.

          Toggle whether cutting text will cut the whole line or just from the
          current cursor position to the end of the line.

          Toggle whether long lines will be wrapped to the next line.

          Toggle whether the suspend sequence (normally ^Z) will  suspend  the
          editor window.

       Valid menu sections are:

          The main editor window where text is entered.

          The search menu (AKA whereis).

          The 'search to replace' menu.

          The 'replace with' menu, which comes up after 'search to replace'.

          The 'goto line (and column)' menu.

          The 'write file' menu.

          The 'insert file' menu.

          The  menu for inserting output from an external comman, reached from
          the insert menu.

          The help menu.

          The interactive spell checker Yes/no menu.

          The file browser for inserting or writing a file.

          using all.  Same key syntax as for binding.  Rebinds the key key  to
          a new function named function in the context of menu menu.  The for-
          mat of  key should be one of:

              System-wide configuration file

              Per-user configuration file

       /usr/share/doc/nano/examples/nanorc.sample (or equivalent on your  sys-
       Chris  Allegretta  <>, et al (see AUTHORS and THANKS for
       details).  This manual page was originally  written  by  Jordi  Mallach
       <>, for the Debian system (but may be used by others).

August 23, 2007                  version 2.0.0                       NANORC(5)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2019 Hurricane Electric. All Rights Reserved.