{
    "content": [
        {
            "type": "text",
            "text": "# nan (info)\n\n## Sections\n\n- **The GNU nano text editor**\n- **1 Introduction**\n- **2 Invoking**\n- **3 Editor Basics** (9 subsections)\n- **4 The Help Viewer**\n- **5 The File Browser**\n- **6 Command-line Options**\n- **7 Feature Toggles**\n- **8 Nanorc Files** (3 subsections)\n- **9 Pico Compatibility**\n- **10 Building and its Options**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "nan",
        "section": "",
        "mode": "info",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "The GNU nano text editor",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "1 Introduction",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "2 Invoking",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "3 Editor Basics",
                "lines": 14,
                "subsections": [
                    {
                        "name": "3.1 Screen Layout",
                        "lines": 23
                    },
                    {
                        "name": "3.2 Entering Text",
                        "lines": 20
                    },
                    {
                        "name": "3.3 Commands",
                        "lines": 17
                    },
                    {
                        "name": "3.4 The Cutbuffer",
                        "lines": 13
                    },
                    {
                        "name": "3.5 The Mark",
                        "lines": 17
                    },
                    {
                        "name": "3.6 Search and Replace",
                        "lines": 12
                    },
                    {
                        "name": "3.7 Using the Mouse",
                        "lines": 12
                    },
                    {
                        "name": "3.8 Anchors",
                        "lines": 16
                    },
                    {
                        "name": "3.9 Limitations",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "4 The Help Viewer",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "5 The File Browser",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "6 Command-line Options",
                "lines": 357,
                "subsections": []
            },
            {
                "name": "7 Feature Toggles",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "8 Nanorc Files",
                "lines": 32,
                "subsections": [
                    {
                        "name": "8.1 Settings",
                        "lines": 360
                    },
                    {
                        "name": "8.2 Syntax Highlighting",
                        "lines": 135
                    },
                    {
                        "name": "8.3 Rebinding Keys",
                        "lines": 474
                    }
                ]
            },
            {
                "name": "9 Pico Compatibility",
                "lines": 90,
                "subsections": []
            },
            {
                "name": "10 Building and its Options",
                "lines": 123,
                "subsections": []
            }
        ],
        "sections": {
            "The GNU nano text editor": {
                "content": "This manual documents GNU 'nano', version 6.2.\n\n* Menu:\n\n* Introduction::\n* Invoking::\n* Editor Basics::\n* The Help Viewer::\n* The File Browser::\n* Command-line Options::\n* Feature Toggles::\n* Nanorc Files::\n* Pico Compatibility::\n* Building and its Options::\n\nFile: nano.info,  Node: Introduction,  Next: Invoking,  Prev: Top,  Up: Top\n",
                "subsections": []
            },
            "1 Introduction": {
                "content": "GNU 'nano' is a small and friendly text editor.  Besides basic text\nediting, 'nano' offers features like undo/redo, syntax coloring,\ninteractive search-and-replace, auto-indentation, line numbers, word\ncompletion, file locking, backup files, and internationalization\nsupport.\n\nThe original goal for 'nano' was to be a complete bug-for-bug\nemulation of Pico.  But currently the goal is to be as compatible as is\nreasonable while offering a superset of Pico's functionality.  *Note\nPico Compatibility:: for more details on how 'nano' and Pico differ.\n\nStarting with version 4.0, 'nano' no longer hard-wraps an overlong\nline by default.  It further uses linewise scrolling by default, and by\ndefault includes the line below the title bar into the editing area.  If\nyou want the old, Pico behavior back, you can use the following options:\n'--breaklonglines', '--jumpyscrolling', and '--emptyline' (or '-bje').\n\nPlease report bugs via <https://savannah.gnu.org/bugs/?group=nano>.\n\nFor background information see <https://nano-editor.org/>.\n\nFile: nano.info,  Node: Invoking,  Next: Editor Basics,  Prev: Introduction,  Up: Top\n",
                "subsections": []
            },
            "2 Invoking": {
                "content": "The usual way to invoke 'nano' is:\n\nnano [FILE]\n\nBut it is also possible to specify one or more options (*note\nCommand-line Options::), and to edit several files in a row.\nAdditionally, the cursor can be put on a specific line of a file by\nadding the line number with a plus sign before the filename, and even in\na specific column by adding it with a comma.  (Negative numbers count\nfrom the end of the file or line.)  The cursor can also be put on the\nfirst or last occurrence of a specific string by specifying that string\nafter '+/' or '+?' before the filename.  The string can be made case\nsensitive and/or caused to be interpreted as a regular expression by\ninserting a 'c' and/or 'r' after the plus sign.  These search modes can\nbe explicitly disabled by using the uppercase variant of those letters:\n'C' and/or 'R'.  When the string contains spaces, it needs to be\nenclosed in quotes.  A more complete command synopsis thus is:\n\nnano [OPTION]... [[+LINE[,COLUMN]|+[crCR](/|?)STRING] FILE]...\n\nNormally, however, you set your preferred options in a 'nanorc' file\n(*note Nanorc Files::).  And when using 'set positionlog' (making 'nano'\nremember the cursor position when you close a file), you will rarely\nneed to specify a line number.\n\nAs a special case: when instead of a filename a dash is given, 'nano'\nwill read data from standard input.  This means you can pipe the output\nof a command straight into a buffer, and then edit it.\n\nFile: nano.info,  Node: Editor Basics,  Next: The Help Viewer,  Prev: Invoking,  Up: Top\n",
                "subsections": []
            },
            "3 Editor Basics": {
                "content": "* Menu:\n\n* Screen Layout::\n* Entering Text::\n* Commands::\n* The Cutbuffer::\n* The Mark::\n* Search and Replace::\n* Using the Mouse::\n* Anchors::\n* Limitations::\n\nFile: nano.info,  Node: Screen Layout,  Next: Entering Text,  Up: Editor Basics\n",
                "subsections": [
                    {
                        "name": "3.1 Screen Layout",
                        "content": "The default screen of 'nano' consists of four areas.  From top to bottom\nthese are: the title bar, the edit window, the status bar, and two help\nlines.\n\nThe title bar consists of three sections: left, center and right.\nThe section on the left displays the version of 'nano' being used.  The\ncenter section displays the current filename, or \"New Buffer\" if the\nfile has not yet been named.  The section on the right displays\n\"Modified\" if the file has been modified since it was last saved or\nopened.\n\nThe status bar is the third line from the bottom of the screen.  It\nshows important and informational messages.  Any error messages that\noccur from using the editor will appear on the status bar.  Any\nquestions that are asked of the user will be asked on the status bar,\nand any user input (search strings, filenames, etc.)  will be input on\nthe status bar.\n\nThe two help lines at the bottom of the screen show some of the most\nessential functions of the editor.\n\nFile: nano.info,  Node: Entering Text,  Next: Commands,  Prev: Screen Layout,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.2 Entering Text",
                        "content": "'nano' is a \"modeless\" editor.  This means that all keystrokes, with the\nexception of Control and Meta sequences, enter text into the file being\nedited.\n\nCharacters not present on the keyboard can be entered in two ways:\n\n* For characters with a single-byte code, pressing the Esc key twice\nand then typing a three-digit decimal number (from '000' to '255')\nwill make 'nano' behave as if you typed the key with that value.\n\n* For any possible character, pressing 'M-V' (Alt+V) and then typing\na six-digit hexadecimal number (starting with '0' or '1') will\nenter the corresponding Unicode character into the buffer.\n\nFor example, typing 'Esc Esc 2 3 4' will enter the character \"e^\" --\nuseful when writing about a French party.  Typing 'M-V 0 0 2 2 c 4' will\nenter the symbol \"???\", a little diamond.\n\nFile: nano.info,  Node: Commands,  Next: The Cutbuffer,  Prev: Entering Text,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.3 Commands",
                        "content": "Commands are given by using the Control key (Ctrl, shown as '^') or the\nMeta key (Alt or Cmd, shown as 'M-').\n\n* A control-key sequence is entered by holding down the Ctrl key and\npressing the desired key.\n\n* A meta-key sequence is entered by holding down the Meta key\n(normally the Alt key) and pressing the desired key.\n\nIf for some reason on your system the combinations with Ctrl or Alt\ndo not work, you can generate them by using the Esc key.  A control-key\nsequence is generated by pressing the Esc key twice and then pressing\nthe desired key, and a meta-key sequence by pressing the Esc key once\nand then pressing the desired key.\n\nFile: nano.info,  Node: The Cutbuffer,  Next: The Mark,  Prev: Commands,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.4 The Cutbuffer",
                        "content": "Text can be cut from a file a whole line at a time with '^K'.  The cut\nline is stored in the cutbuffer.  Consecutive strokes of '^K' will add\neach cut line to this buffer, but a '^K' after any other keystroke will\noverwrite the entire cutbuffer.\n\nThe contents of the cutbuffer can be pasted at the current cursor\nposition with '^U'.\n\nA line of text can be copied into the cutbuffer (without cutting it)\nwith 'M-6'.\n\nFile: nano.info,  Node: The Mark,  Next: Search and Replace,  Prev: The Cutbuffer,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.5 The Mark",
                        "content": "Text can be selected by first 'setting the Mark' with '^6' or 'M-A' and\nthen moving the cursor to the other end of the portion to be selected.\nThe selected portion of text will be highlighted.  This selection can\nnow be cut or copied in its entirety with a single '^K' or 'M-6'.  Or\nthe selection can be used to limit the scope of a search-and-replace\n('^\\') or spell-checking session ('^T^T').\n\nOn some terminals, text can be selected also by holding down 'Shift'\nwhile using the cursor keys.  Holding down the 'Ctrl' or 'Alt' key too\nwill increase the stride.  Such a selection is cancelled upon any cursor\nmovement where 'Shift' isn't held.\n\nCutting or copying selected text toggles off the mark automatically.\nIf needed, it can be toggled off manually with another '^6' or 'M-A'.\n\nFile: nano.info,  Node: Search and Replace,  Next: Using the Mouse,  Prev: The Mark,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.6 Search and Replace",
                        "content": "One can search the current buffer for the occurrence of any string with\nthe Search command (default key binding: '^W').  The default search mode\nis forward, case-insensitive, and for literal strings.  But one can\nsearch backwards by pressing 'M-B', search case sensitively with 'M-C',\nand interpret regular expressions in the search string with 'M-R'.\n\nA regular expression in a search string always covers just one line;\nit cannot span multiple lines.  And when replacing (with '^\\' or 'M-R')\nthe replacement string cannot contain a newline (LF).\n\nFile: nano.info,  Node: Using the Mouse,  Next: Anchors,  Prev: Search and Replace,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.7 Using the Mouse",
                        "content": "When mouse support has been configured and enabled, a single mouse click\nplaces the cursor at the indicated position.  Clicking a second time in\nthe same position toggles the mark.  Clicking in the two help lines\nexecutes the selected shortcut.  To be able to select text with the left\nbutton, or paste text with the middle button, hold down the Shift key\nduring those actions.\n\nThe mouse will work in the X Window System, and on the console when\ngpm is running.\n\nFile: nano.info,  Node: Anchors,  Next: Limitations,  Prev: Using the Mouse,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.8 Anchors",
                        "content": "With 'M-Ins' you can place an anchor (a kind of temporary bookmark) at\nthe current line.  With 'M-PgUp' and 'M-PgDn' you can jump to an anchor\nin the backward/forward direction.  This jumping wraps around at the top\nand bottom.\n\nWhen a line with an anchor is removed, the line where the cursor ends\nup inherits the anchor.  After performing an operation on the entire\nbuffer (like formatting it, piping it through a command, or doing an\nexternal spell check on it), any anchors that were present are gone.\nAnd when you close the buffer, all its anchors simply disappear; they\nare not saved.\n\nAnchors are visualized in the margin when line numbers are activated.\n\nFile: nano.info,  Node: Limitations,  Prev: Anchors,  Up: Editor Basics\n"
                    },
                    {
                        "name": "3.9 Limitations",
                        "content": "The recording and playback of keyboard macros works correctly only on a\nterminal emulator, not on a Linux console (VT), because the latter does\nnot by default distinguish modified from unmodified arrow keys.\n\nFile: nano.info,  Node: The Help Viewer,  Next: The File Browser,  Prev: Editor Basics,  Up: Top\n"
                    }
                ]
            },
            "4 The Help Viewer": {
                "content": "The built-in help in 'nano' is available by pressing '^G'.  It is fairly\nself-explanatory.  It documents the various parts of the editor and the\navailable keystrokes.  Navigation is via the '^Y' (Page Up) and '^V'\n(Page Down) keys.  '^X' exits from the help viewer.\n\nFile: nano.info,  Node: The File Browser,  Next: Command-line Options,  Prev: The Help Viewer,  Up: Top\n",
                "subsections": []
            },
            "5 The File Browser": {
                "content": "When in the Read-File ('^R') or Write-Out menu ('^O'), pressing '^T'\nwill invoke the file browser.  Here, one can navigate directories in a\ngraphical manner in order to find the desired file.\n\nBasic movement in the file browser is accomplished with the arrow and\nother cursor-movement keys.  More targeted movement is accomplished by\nsearching, via '^W' or 'w', or by changing directory, via '^' or 'g'.\nThe behavior of the 'Enter' key (or 's') varies by what is currently\nselected.  If the currently selected object is a directory, the file\nbrowser will enter and display the contents of the directory.  If the\nobject is a file, this filename and path are copied to the status bar,\nand the file browser exits.\n\nFile: nano.info,  Node: Command-line Options,  Next: Feature Toggles,  Prev: The File Browser,  Up: Top\n",
                "subsections": []
            },
            "6 Command-line Options": {
                "content": "'nano' takes the following options from the command line:\n\n'-A'\n'--smarthome'\nMake the Home key smarter.  When Home is pressed anywhere but at\nthe very beginning of non-whitespace characters on a line, the\ncursor will jump to that beginning (either forwards or backwards).\nIf the cursor is already at that position, it will jump to the true\nbeginning of the line.\n\n'-B'\n'--backup'\nWhen saving a file, back up the previous version of it, using the\ncurrent filename suffixed with a tilde ('~').\n\n'-C DIRECTORY'\n'--backupdir=DIRECTORY'\nMake and keep not just one backup file, but make and keep a\nuniquely numbered one every time a file is saved -- when backups are\nenabled.  The uniquely numbered files are stored in the specified\ndirectory.\n\n'-D'\n'--boldtext'\nFor the interface, use bold instead of reverse video.  This will be\noverridden by setting the options 'titlecolor', 'statuscolor',\n'keycolor', 'functioncolor', 'numbercolor', and/or 'selectedcolor'\nin your nanorc file.  *Note set keycolor:: for details.\n\n'-E'\n'--tabstospaces'\nConvert each typed tab to spaces -- to the number of spaces that a\ntab at that position would take up.\n\n'-F'\n'--multibuffer'\nRead a file into a new buffer by default.\n\n'-G'\n'--locking'\nEnable vim-style file locking when editing files.\n\n'-H'\n'--historylog'\nSave the last hundred search strings and replacement strings and\nexecuted commands, so they can be easily reused in later sessions.\n\n'-I'\n'--ignorercfiles'\nDon't look at the system's nanorc file nor at the user's nanorc.\n\n'-J'\n'--guidestripe'\nDraw a vertical stripe at the given column, to help judge the width\nof the text.  (The color of the stripe can be changed with 'set\nstripecolor' in your nanorc file.)\n\n'-K'\n'--rawsequences'\nInterpret escape sequences directly, instead of asking 'ncurses' to\ntranslate them.  (If you need this option to get some keys to work\nproperly, it means that the terminfo terminal description that is\nused does not fully match the actual behavior of your terminal.\nThis can happen when you ssh into a BSD machine, for example.)\nUsing this option disables 'nano''s mouse support.\n\n'-L'\n'--nonewlines'\nDon't automatically add a newline when a text does not end with\none.  (This can cause you to save non-POSIX text files.)\n\n'-M'\n'--trimblanks'\nSnip trailing whitespace from the wrapped line when automatic\nhard-wrapping occurs or when text is justified.\n\n'-N'\n'--noconvert'\nDisable automatic conversion of files from DOS/Mac format.\n\n'-O'\n'--bookstyle'\nWhen justifying, treat any line that starts with whitespace as the\nbeginning of a paragraph (unless auto-indenting is on).\n\n'-P'\n'--positionlog'\nFor the 200 most recent files, log the last position of the cursor,\nand place it at that position again upon reopening such a file.\n\n'-Q \"REGEX\"'\n'--quotestr=\"REGEX\"'\nSet the regular expression for matching the quoting part of a line.\nThe default value is \"^([ \\t]*([!#%:;>|}]|//))+\".  (Note that '\\t'\nstands for a literal Tab character.)  This makes it possible to\nrejustify blocks of quoted text when composing email, and to rewrap\nblocks of line comments when writing source code.\n\n'-R'\n'--restricted'\nRestricted mode: don't read or write to any file not specified on\nthe command line.  This means: don't read or write history files;\ndon't allow suspending; don't allow spell checking; don't allow a\nfile to be appended to, prepended to, or saved under a different\nname if it already has one; and don't make backup files.\nRestricted mode can also be activated by invoking 'nano' with any\nname beginning with 'r' (e.g. 'rnano').\n\n'-S'\n'--softwrap'\nDisplay over multiple screen rows lines that exceed the screen's\nwidth.  (You can make this soft-wrapping occur at whitespace\ninstead of rudely at the screen's edge, by using also\n'--atblanks'.)  (The old short option, '-$', is deprecated.)\n\n'-T NUMBER'\n'--tabsize=NUMBER'\nSet the displayed tab length to NUMBER columns.  The value of\nNUMBER must be greater than 0.  The default value is 8.\n\n'-U'\n'--quickblank'\nMake status-bar messages disappear after 1 keystroke instead of\nafter 20.  Note that option '-c' ('--constantshow') overrides this.\nWhen option '--minibar' or '--zero' is in effect, '--quickblank'\nmakes a message disappear after 0.8 seconds instead of after the\ndefault 1.5 seconds.\n\n'-V'\n'--version'\nShow the current version number and exit.\n\n'-W'\n'--wordbounds'\nDetect word boundaries differently by treating punctuation\ncharacters as parts of words.\n\n'-X \"CHARACTERS\"'\n'--wordchars=\"CHARACTERS\"'\nSpecify which other characters (besides the normal alphanumeric\nones) should be considered as parts of words.  When using this\noption, you probably want to omit '-W' ('--wordbounds').\n\n'-Y NAME'\n'--syntax=NAME'\nSpecify the syntax to be used for highlighting.  *Note Syntax\nHighlighting:: for more info.\n\n'-Z'\n'--zap'\nLet an unmodified 'Backspace' or 'Delete' erase the marked region\n(instead of a single character, and without affecting the\ncutbuffer).\n\n'-a'\n'--atblanks'\nWhen doing soft line wrapping, wrap lines at whitespace instead of\nalways at the edge of the screen.\n\n'-b'\n'--breaklonglines'\nAutomatically hard-wrap the current line when it becomes overlong.\n(This option is the opposite of '-w' ('--nowrap') -- the last one\ngiven takes effect.)\n\n'-c'\n'--constantshow'\nConstantly display the cursor position (line number, column number,\nand character number) on the status bar.  Note that this overrides\noption '-U' ('--quickblank').\n\n'-d'\n'--rebinddelete'\nInterpret the 'Delete' and 'Backspace' keys differently so that\nboth work properly.  You should only use this option when on your\nsystem either 'Backspace' acts like Delete or 'Delete' acts like\nBackspace.\n\n'-e'\n'--emptyline'\nDo not use the line below the title bar, leaving it entirely blank.\n\n'-f FILE'\n'--rcfile=FILE'\nRead only this FILE for setting nano's options, instead of reading\nboth the system-wide and the user's nanorc files.\n\n'-g'\n'--showcursor'\nMake the cursor visible in the file browser (putting it on the\nhighlighted item) and in the help viewer.  Useful for braille users\nand people with poor vision.\n\n'-h'\n'--help'\nShow a summary of command-line options and exit.\n\n'-i'\n'--autoindent'\nAutomatically indent a newly created line to the same number of\ntabs and/or spaces as the previous line (or as the next line if the\nprevious line is the beginning of a paragraph).\n\n'-j'\n'--jumpyscrolling'\nScroll the buffer contents per half-screen instead of per line.\n\n'-k'\n'--cutfromcursor'\nMake the 'Cut Text' command (normally '^K') cut from the current\ncursor position to the end of the line, instead of cutting the\nentire line.\n\n'-l'\n'--linenumbers'\nDisplay line numbers to the left of the text area.  (Any line with\nan anchor additionally gets a mark in the margin.)\n\n'-m'\n'--mouse'\nEnable mouse support, if available for your system.  When enabled,\nmouse clicks can be used to place the cursor, set the mark (with a\ndouble click), and execute shortcuts.  The mouse will work in the X\nWindow System, and on the console when gpm is running.  Text can\nstill be selected through dragging by holding down the Shift key.\n\n'-n'\n'--noread'\nTreat any name given on the command line as a new file.  This\nallows 'nano' to write to named pipes: it will start with a blank\nbuffer, and will write to the pipe when the user saves the \"file\".\nThis way 'nano' can be used as an editor in combination with for\ninstance 'gpg' without having to write sensitive data to disk\nfirst.\n\n'-o DIRECTORY'\n'--operatingdir=DIRECTORY'\nSet the operating directory.  This makes 'nano' set up something\nsimilar to a chroot.\n\n'-p'\n'--preserve'\nPreserve the '^Q' (XON) and '^S' (XOFF) sequences so data being\nsent to the editor can be stopped and started.\n\n'-q'\n'--indicator'\nDisplay a \"scrollbar\" on the righthand side of the edit window.  It\nshows the position of the viewport in the buffer and how much of\nthe buffer is covered by the viewport.\n\n'-r NUMBER'\n'--fill=NUMBER'\nSet the target width for justifying and automatic hard-wrapping at\nthis NUMBER of columns.  If the value is 0 or less, wrapping will\noccur at the width of the screen minus NUMBER columns, allowing the\nwrap point to vary along with the width of the screen if the screen\nis resized.  The default value is -8.\n\n'-s \"PROGRAM [ARGUMENT ...]\"'\n'--speller=\"PROGRAM [ARGUMENT ...]\"'\nUse the given program to do spell checking and correcting.  By\ndefault, 'nano' uses the command specified in the 'SPELL'\nenvironment variable.  If 'SPELL' is not set, and '--speller' is\nnot specified either, then 'nano' uses its own interactive spell\ncorrector, which requires either 'hunspell' or GNU 'spell' to be\ninstalled.\n\n'-t'\n'--saveonexit'\nSave a changed buffer without prompting (when exiting with '^X').\nThis can be handy when 'nano' is used as the composer of an email\nprogram.  (The old form of the long option, '--tempfile', is\ndeprecated.)\n\n'-u'\n'--unix'\nSave a file by default in Unix format.  This overrides nano's\ndefault behavior of saving a file in the format that it had.  (This\noption has no effect when you also use '--noconvert'.)\n\n'-v'\n'--view'\nDon't allow the contents of the file to be altered: read-only mode.\nThis mode allows the user to open also other files for viewing,\nunless '--restricted' is given too.  (Note that this option should\nNOT be used in place of correct file permissions to implement a\nread-only file.)\n\n'-w'\n'--nowrap'\nDo not automatically hard-wrap the current line when it becomes\noverlong.  This is the default.  (This option is the opposite of\n'-b' ('--breaklonglines') -- the last one given takes effect.)\n\n'-x'\n'--nohelp'\nExpert mode: don't show the two help lines at the bottom of the\nscreen.  This affects the location of the status bar as well, as in\nExpert mode it is located at the very bottom of the editor.\n\nNote: When accessing the help system, Expert mode is temporarily\ndisabled to display the help-system navigation keys.\n\n'-y'\n'--afterends'\nMake 'Ctrl+Right' and 'Ctrl+Delete' stop at word ends instead of\nbeginnings.\n\n'-z'\n'--suspendable'\nObsolete option; ignored.  Suspension is enabled by default,\nreachable via '^T^Z'.  (If you want a plain '^Z' to suspend nano,\nadd 'bind ^Z suspend main' to your nanorc.)\n\n'-%'\n'--stateflags'\nUse the top-right corner of the screen for showing some state\nflags: 'I' when auto-indenting, 'M' when the mark is on, 'L' when\nhard-wrapping (breaking long lines), 'R' when recording a macro,\nand 'S' when soft-wrapping.  When the buffer is modified, a star\n('*') is shown after the filename in the center of the title bar.\n\n'-'\n'--minibar'\nSuppress the title bar and instead show information about the\ncurrent buffer at the bottom of the screen, in the space for the\nstatus bar.  In this \"minibar\" the filename is shown on the left,\nfollowed by an asterisk if the buffer has been modified.  On the\nright are displayed the current line and column number, the code of\nthe character under the cursor (in Unicode format: U+xxxx), the\nsame flags as are shown by '--stateflags', and a percentage that\nexpresses how far the cursor is into the file (linewise).  When a\nfile is loaded or saved, and also when switching between buffers,\nthe number of lines in the buffer is displayed after the filename.\nThis number is cleared upon the next keystroke, or replaced with an\n[i/n] counter when multiple buffers are open.  The line plus column\nnumbers and the character code are displayed only when\n'--constantshow' is used, and can be toggled on and off with 'M-C'.\nThe state flags are displayed only when '--stateflags' is used.\n\n'-0'\n'--zero'\nHide all elements of the interface (title bar, status bar, and help\nlines) and use all rows of the terminal for showing the contents of\nthe buffer.  The status bar appears only when there is a\nsignificant message, and disappears after 1.5 seconds or upon the\nnext keystroke.  With 'M-Z' the title bar plus status bar can be\ntoggled.  With 'M-X' the help lines.\n\n'-!'\n'--magic'\nWhen neither the file's name nor its first line give a clue, try\nusing libmagic to determine the applicable syntax.\n\nFile: nano.info,  Node: Feature Toggles,  Next: Nanorc Files,  Prev: Command-line Options,  Up: Top\n",
                "subsections": []
            },
            "7 Feature Toggles": {
                "content": "Toggles allow you to change certain aspects of the editor while you are\nediting, aspects that you would normally specify via command-line\noptions or nanorc options.  Each toggle can be flicked via a Meta-key\ncombination -- the 'Meta' key is normally the 'Alt' key (*note Commands::\nfor more details).  The following global toggles are available:\n\n'Constant Cursor Position Display'\n'M-C' toggles the '-c' ('--constantshow') command-line option.\n\n'Smart Home Key'\n'M-H' toggles the '-A' ('--smarthome') command-line option.\n\n'Auto Indent'\n'M-I' toggles the '-i' ('--autoindent') command-line option.\n\n'Cut From Cursor To End-of-Line'\n'M-K' toggles the '-k' ('--cutfromcursor') command-line option.\n\n'Long-Line Wrapping'\n'M-L' toggles the '-b' ('--breaklonglines') command-line option.\n\n'Mouse Support'\n'M-M' toggles the '-m' ('--mouse') command-line option.\n\n'Line Numbers'\n'M-N' toggles the '-l' ('--linenumbers') command-line option.\n\n'Tabs To Spaces'\n'M-O' toggles the '-E' ('--tabstospaces') command-line option.\n\n'Whitespace Display'\n'M-P' toggles the displaying of whitespace (*note Whitespace::).\n\n'Soft Wrapping'\n'M-S' toggles the '-S' ('--softwrap') command-line option.\n\n'Expert'\n'M-X' toggles the '-x' ('--nohelp') command-line option.\n\n'Syntax Coloring'\n'M-Y' toggles syntax coloring, when your nanorc defines syntaxes\n(*note Syntax Highlighting::).\n\n'Hidden Interface'\n'M-Z' toggles the '-0' ('--zero') command-line option, but without\nthe '-x' ('--nohelp') part.  That is: it toggles just the title bar\nplus status bar (or the combined minibar plus status bar), not the\nhelp lines.  The latter are toggled with 'M-X'.\n\nFile: nano.info,  Node: Nanorc Files,  Next: Pico Compatibility,  Prev: Feature Toggles,  Up: Top\n",
                "subsections": []
            },
            "8 Nanorc Files": {
                "content": "Nanorc files can be used to configure 'nano' to your liking without\nusing command-line options.  During startup 'nano' will normally read\ntwo files: first the system-wide file, '/etc/nanorc' (the exact path may\nbe different on your system), and then the user-specific file, either\n'~/.nanorc' or '$XDGCONFIGHOME/nano/nanorc' or '.config/nano/nanorc',\nwhichever exists first.  However, if '--rcfile' is given, 'nano' will\nskip the above files and will read just the specified settings file.\n\nA nanorc file can contain 'set' and 'unset' commands for various\noptions (*note Settings::).  It can also contain commands that define\nsyntax highlighting (*note Syntax Highlighting::) and commands that\nrebind keys (*note Rebinding Keys::).  Each command should be on a\nseparate line, and all commands should be written in lowercase.\n\nOptions that do not take an argument are unset by default.  So using\nthe 'unset' command is only needed when wanting to override a setting\nfrom the system's nanorc file in your own nanorc.  Options that take an\nargument cannot be unset, but can be assigned the empty string.\n\nAny command-line option overrides its nanorc setting, of course.\n\nQuotes inside the CHARACTERS parameters below should not be escaped.\nThe last double quote on the line will be seen as the closing quote.\n\n* Menu:\n\n* Settings::\n* Syntax Highlighting::\n* Rebinding Keys::\n\nFile: nano.info,  Node: Settings,  Next: Syntax Highlighting,  Up: Nanorc Files\n",
                "subsections": [
                    {
                        "name": "8.1 Settings",
                        "content": "The supported settings in a nanorc file are:\n\n'set afterends'\nMake 'Ctrl+Right' and 'Ctrl+Delete' stop at word ends instead of\nbeginnings.\n\n'set allowinsecurebackup'\nWhen backing up files, allow the backup to succeed even if its\npermissions can't be (re)set due to special OS considerations.  You\nshould NOT enable this option unless you are sure you need it.\n\n'set atblanks'\nWhen soft line wrapping is enabled, make it wrap lines at blank\ncharacters (tabs and spaces) instead of always at the edge of the\nscreen.\n\n'set autoindent'\nAutomatically indent a newly created line to the same number of\ntabs and/or spaces as the previous line (or as the next line if the\nprevious line is the beginning of a paragraph).\n\n'set backup'\nWhen saving a file, back up the previous version of it, using the\ncurrent filename suffixed with a tilde ('~').\n\n'set backupdir \"DIRECTORY\"'\nMake and keep not just one backup file, but make and keep a\nuniquely numbered one every time a file is saved -- when backups are\nenabled with 'set backup' or '--backup' or '-B'.  The uniquely\nnumbered files are stored in the specified directory.\n\n'set boldtext'\nUse bold instead of reverse video for the title bar, status bar,\nkey combos, function tags, line numbers, and selected text.  This\nis overridden by setting the options 'titlecolor', 'statuscolor',\n'keycolor', 'functioncolor', 'numbercolor', and/or 'selectedcolor'.\n\n'set bookstyle'\nWhen justifying, treat any line that starts with whitespace as the\nbeginning of a paragraph (unless auto-indenting is on).\n\n'set brackets \"CHARACTERS\"'\nSet the characters treated as closing brackets when justifying\nparagraphs.  This may not include blank characters.  Only closing\npunctuation (see 'set punct'), optionally followed by the specified\nclosing brackets, can end sentences.  The default value is\n\"\"')>]}\".\n\n'set breaklonglines'\nAutomatically hard-wrap the current line when it becomes overlong.\n\n'set casesensitive'\nDo case-sensitive searches by default.\n\n'set constantshow'\nConstantly display the cursor position on the status bar.  Note\nthat this overrides 'quickblank'.\n\n'set cutfromcursor'\nUse cut-from-cursor-to-end-of-line by default, instead of cutting\nthe whole line.\n\n'set emptyline'\nDo not use the line below the title bar, leaving it entirely blank.\n\n'set errorcolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the status bar when an error message\nis displayed.  The default value is bold,white,red.  *Note set\nkeycolor:: for valid color names.\n\n'set fill NUMBER'\nSet the target width for justifying and automatic hard-wrapping at\nthis NUMBER of columns.  If the value is 0 or less, wrapping will\noccur at the width of the screen minus NUMBER columns, allowing the\nwrap point to vary along with the width of the screen if the screen\nis resized.  The default value is -8.\n\n'set functioncolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the concise function descriptions in\nthe two help lines at the bottom of the screen.  *Note set\nkeycolor:: for valid color names.\n\n'set guidestripe NUMBER'\nDraw a vertical stripe at the given column, to help judge the width\nof the text.  (The color of the stripe can be changed with 'set\nstripecolor'.)\n\n'set historylog'\nSave the last hundred search strings and replacement strings and\nexecuted commands, so they can be easily reused in later sessions.\n\n'set indicator'\nDisplay a \"scrollbar\" on the righthand side of the edit window.  It\nshows the position of the viewport in the buffer and how much of\nthe buffer is covered by the viewport.\n\n'set jumpyscrolling'\nScroll the buffer contents per half-screen instead of per line.\n\n'set keycolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the shortcut key combos in the two\nhelp lines at the bottom of the screen.  Valid names for the\nforeground and background colors are: 'red', 'green', 'blue',\n'magenta', 'yellow', 'cyan', 'white', and 'black'.  Each of these\neight names may be prefixed with the word 'light' to get a brighter\nversion of that color.  The word 'grey' or 'gray' may be used as a\nsynonym for 'lightblack'.\n\nOn terminal emulators that can do at least 256 colors, other valid\n(but unprefixable) color names are: 'pink', 'purple', 'mauve',\n'lagoon', 'mint', 'lime', 'peach', 'orange', 'latte', 'rosy',\n'beet', 'plum', 'sea', 'sky', 'slate', 'teal', 'sage', 'brown',\n'ocher', 'sand', 'tawny', 'brick', 'crimson', and 'normal' -- where\n'normal' means the default foreground or background color.  On such\nemulators, the color may also be specified as a three-digit\nhexadecimal number prefixed with '#', with the digits representing\nthe amounts of red, green, and blue, respectively.  This tells\n'nano' to select from the available palette the color that\napproximates the given values.\n\nEither FGCOLOR or ,BGCOLOR may be left out, and the pair may be\npreceded by 'bold' and/or 'italic' (separated by commas) to get a\nbold and/or slanting typeface, if your terminal can do those.\n\n'set linenumbers'\nDisplay line numbers to the left of the text area.  (Any line with\nan anchor additionally gets a mark in the margin.)\n\n'set locking'\nEnable vim-style lock-files for when editing files.\n\n'set magic'\nWhen neither the file's name nor its first line give a clue, try\nusing libmagic to determine the applicable syntax.  (Calling\nlibmagic can be relatively time consuming.  It is therefore not\ndone by default.)\n\n'set matchbrackets \"CHARACTERS\"'\nSpecify the opening and closing brackets that can be found by\nbracket searches.  This may not include blank characters.  The\nopening set must come before the closing set, and the two sets must\nbe in the same order.  The default value is \"(<[{)>]}\".\n\n'set minibar'\nSuppress the title bar and instead show information about the\ncurrent buffer at the bottom of the screen, in the space for the\nstatus bar.  In this \"minibar\" the filename is shown on the left,\nfollowed by an asterisk if the buffer has been modified.  On the\nright are displayed the current line and column number, the code of\nthe character under the cursor (in Unicode format: U+xxxx), the\nsame flags as are shown by 'set stateflags', and a percentage that\nexpresses how far the cursor is into the file (linewise).  When a\nfile is loaded or saved, and also when switching between buffers,\nthe number of lines in the buffer is displayed after the filename.\nThis number is cleared upon the next keystroke, or replaced with an\n[i/n] counter when multiple buffers are open.  The line plus column\nnumbers and the character code are displayed only when 'set\nconstantshow' is used, and can be toggled on and off with 'M-C'.\nThe state flags are displayed only when 'set stateflags' is used.\n\n'set minicolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the minibar.  (When this option is\nnot specified, the colors of the title bar are used.)  *Note set\nkeycolor:: for valid color names.\n\n'set mouse'\nEnable mouse support, so that mouse clicks can be used to place the\ncursor, set the mark (with a double click), or execute shortcuts.\n\n'set multibuffer'\nWhen reading in a file with '^R', insert it into a new buffer by\ndefault.\n\n'set noconvert'\nDon't convert files from DOS/Mac format.\n\n'set nohelp'\nDon't display the help lists at the bottom of the screen.\n\n'set nonewlines'\nDon't automatically add a newline when a text does not end with\none.  (This can cause you to save non-POSIX text files.)\n\n'set nowrap'\nDeprecated option since it has become the default setting.  When\nneeded, use 'unset breaklonglines' instead.\n\n'set numbercolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for line numbers.  *Note set keycolor::\nfor valid color names.\n\n'set operatingdir \"DIRECTORY\"'\n'nano' will only read and write files inside \"directory\" and its\nsubdirectories.  Also, the current directory is changed to here, so\nfiles are inserted from this directory.  By default, the operating\ndirectory feature is turned off.\n\n'set positionlog'\nSave the cursor position of files between editing sessions.  The\ncursor position is remembered for the 200 most-recently edited\nfiles.\n\n'set preserve'\nPreserve the XON and XOFF keys ('^Q' and '^S').\n\n'set promptcolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the prompt bar.  (When this option\nis not specified, the colors of the title bar are used.)  *Note set\nkeycolor:: for valid color names.\n\n'set punct \"CHARACTERS\"'\nSet the characters treated as closing punctuation when justifying\nparagraphs.  This may not include blank characters.  Only the\nspecified closing punctuation, optionally followed by closing\nbrackets (see 'set brackets'), can end sentences.  The default\nvalue is \"!.?\".\n\n'set quickblank'\nMake status-bar messages disappear after 1 keystroke instead of\nafter 20.  Note that option 'constantshow' overrides this.  When\noption 'minibar' or 'zero' is in effect, 'quickblank' makes a\nmessage disappear after 0.8 seconds instead of after the default\n1.5 seconds.\n\n'set quotestr \"REGEX\"'\nSet the regular expression for matching the quoting part of a line.\nThe default value is \"^([ \\t]*([!#%:;>|}]|//))+\".  (Note that '\\t'\nstands for a literal Tab character.)  This makes it possible to\nrejustify blocks of quoted text when composing email, and to rewrap\nblocks of line comments when writing source code.\n\n'set rawsequences'\nInterpret escape sequences directly, instead of asking 'ncurses' to\ntranslate them.  (If you need this option to get some keys to work\nproperly, it means that the terminfo terminal description that is\nused does not fully match the actual behavior of your terminal.\nThis can happen when you ssh into a BSD machine, for example.)\nUsing this option disables 'nano''s mouse support.\n\n'set rebinddelete'\nInterpret the 'Delete' and 'Backspace' keys differently so that\nboth work properly.  You should only use this option when on your\nsystem either 'Backspace' acts like Delete or 'Delete' acts like\nBackspace.\n\n'set regexp'\nDo regular-expression searches by default.  Regular expressions in\n'nano' are of the extended type (ERE).\n\n'set saveonexit'\nSave a changed buffer automatically on exit ('^X'); don't prompt.\n(The old form of this option, 'set tempfile', is deprecated.)\n\n'set scrollercolor FGCOLOR,BGCOLOR'\nUse this color combination for the indicator alias \"scrollbar\".\n(On terminal emulators that link to a libvte older than version\n0.55, using a background color here does not work correctly.)\n*Note set keycolor:: for valid color names.\n\n'set selectedcolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for selected text.  *Note set keycolor::\nfor valid color names.\n\n'set showcursor'\nPut the cursor on the highlighted item in the file browser, and\nshow the cursor in the help viewer, to aid braille users and people\nwith poor vision.\n\n'set smarthome'\nMake the Home key smarter.  When Home is pressed anywhere but at\nthe very beginning of non-whitespace characters on a line, the\ncursor will jump to that beginning (either forwards or backwards).\nIf the cursor is already at that position, it will jump to the true\nbeginning of the line.\n\n'set softwrap'\nDisplay lines that exceed the screen's width over multiple screen\nlines.  (You can make this soft-wrapping occur at whitespace\ninstead of rudely at the screen's edge, by using also 'set\natblanks'.)\n\n'set speller \"PROGRAM [ARGUMENT ...]\"'\nUse the given program to do spell checking and correcting.  *Note\n--speller:: for details.\n\n'set spotlightcolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for highlighting a search match.  The\ndefault value is black,lightyellow.  *Note set keycolor:: for valid\ncolor names.\n\n'set stateflags'\nUse the top-right corner of the screen for showing some state\nflags: 'I' when auto-indenting, 'M' when the mark is on, 'L' when\nhard-wrapping (breaking long lines), 'R' when recording a macro,\nand 'S' when soft-wrapping.  When the buffer is modified, a star\n('*') is shown after the filename in the center of the title bar.\n\n'set statuscolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the status bar.  *Note set\nkeycolor:: for valid color names.\n\n'set stripecolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the vertical guiding stripe.  *Note\nset keycolor:: for valid color names.\n\n'set suspendable'\nObsolete option; ignored.  Suspension is enabled by default,\nreachable via '^T^Z'.  (If you want a plain '^Z' to suspend nano,\nadd 'bind ^Z suspend main' to your nanorc.)\n\n'set tabsize NUMBER'\nUse a tab size of NUMBER columns.  The value of NUMBER must be\ngreater than 0.  The default value is 8.\n\n'set tabstospaces'\nConvert each typed tab to spaces -- to the number of spaces that a\ntab at that position would take up.\n\n'set titlecolor [bold,][italic,]FGCOLOR,BGCOLOR'\nUse this color combination for the title bar.  *Note set keycolor::\nfor valid color names.\n\n'set trimblanks'\nRemove trailing whitespace from wrapped lines when automatic\nhard-wrapping occurs or when text is justified.\n\n'set unix'\nSave a file by default in Unix format.  This overrides nano's\ndefault behavior of saving a file in the format that it had.  (This\noption has no effect when you also use 'set noconvert'.)\n\n'set whitespace \"CHARACTERS\"'\nSet the two characters used to indicate the presence of tabs and\nspaces.  They must be single-column characters.  The default pair\nfor a UTF-8 locale is \">>??\", and for other locales \">.\".\n\n'set wordbounds'\nDetect word boundaries differently by treating punctuation\ncharacters as part of a word.\n\n'set wordchars \"CHARACTERS\"'\nSpecify which other characters (besides the normal alphanumeric\nones) should be considered as parts of words.  When using this\noption, you probably want to unset 'wordbounds'.\n\n'set zap'\nLet an unmodified 'Backspace' or 'Delete' erase the marked region\n(instead of a single character, and without affecting the\ncutbuffer).\n\n'set zero'\nHide all elements of the interface (title bar, status bar, and help\nlines) and use all rows of the terminal for showing the contents of\nthe buffer.  The status bar appears only when there is a\nsignificant message, and disappears after 1.5 seconds or upon the\nnext keystroke.  With 'M-Z' the title bar plus status bar can be\ntoggled.  With 'M-X' the help lines.\n\nFile: nano.info,  Node: Syntax Highlighting,  Next: Rebinding Keys,  Prev: Settings,  Up: Nanorc Files\n"
                    },
                    {
                        "name": "8.2 Syntax Highlighting",
                        "content": "Coloring the different syntactic elements of a file is done via regular\nexpressions (see the 'color' command below).  This is inherently\nimperfect, because regular expressions are not powerful enough to fully\nparse a file.  Nevertheless, regular expressions can do a lot and are\neasy to make, so they are a good fit for a small editor like 'nano'.\n\nSee '/usr/share/nano/' and '/usr/share/nano/extra/' for the\nsyntax-coloring definitions that are available out of the box.\n\nAll regular expressions in 'nano' are POSIX extended regular\nexpressions (ERE). This means that '.', '?', '*', '+', '^', '$', and\nseveral other characters are special.  The period '.' matches any single\ncharacter, '?' means the preceding item is optional, '*' means the\npreceding item may be matched zero or more times, '+' means the\npreceding item must be matched one or more times, '^' matches the\nbeginning of a line, and '$' the end, '\\<' matches the start of a word,\nand '\\>' the end, and '\\s' matches a blank.  It also means that\nlookahead and lookbehind are not possible.  A complete explanation can\nbe found in the manual of GNU grep: 'info grep regular'.\n\nA separate syntax can be defined for each kind of file via the\nfollowing commands in a nanorc file:\n\n'syntax NAME [\"FILEREGEX\" ...]'\nStart the definition of a syntax with this NAME.  All subsequent\n'color' and other such commands will be added to this syntax, until\na new 'syntax' command is encountered.\n\nWhen 'nano' is run, this syntax will be automatically activated if\nthe current filename matches the extended regular expression\nFILEREGEX.  Or the syntax can be explicitly activated by using the\n'-Y' or '--syntax' command-line option followed by the NAME.\n\nThe 'default' syntax is special: it takes no FILEREGEX, and applies\nto files that don't match any syntax's regexes.  The 'none' syntax\nis reserved; specifying it on the command line is the same as not\nhaving a syntax at all.\n\n'header \"REGEX\" ...'\nIf from all defined syntaxes no FILEREGEX matched, then compare\nthis REGEX (or regexes) against the first line of the current file,\nto determine whether this syntax should be used for it.\n\n'magic \"REGEX\" ...'\nIf no FILEREGEX matched and no 'header' regex matched either, then\ncompare this REGEX (or regexes) against the result of querying the\n'magic' database about the current file, to determine whether this\nsyntax should be used for it.  (This functionality only works when\n'libmagic' is installed on the system and will be silently ignored\notherwise.)\n\n'formatter PROGRAM [ARGUMENT ...]'\nRun the given PROGRAM on the full contents of the current buffer.\n(The current buffer is written out to a temporary file, the program\nis run on it, and then the temporary file is read back in,\nreplacing the contents of the buffer.)\n\n'linter PROGRAM [ARGUMENT ...]'\nUse the given PROGRAM to do a syntax check on the current buffer.\n\n'comment \"STRING\"'\nUse the given string for commenting and uncommenting lines.  If the\nstring contains a vertical bar or pipe character (|), this\ndesignates bracket-style comments; for example, \"/*|*/\" for CSS\nfiles.  The characters before the pipe are prepended to the line\nand the characters after the pipe are appended at the end of the\nline.  If no pipe character is present, the full string is\nprepended; for example, \"#\" for Python files.  If empty double\nquotes are specified, the comment/uncomment functions are disabled;\nfor example, \"\" for JSON. The default value is \"#\".\n\n'tabgives \"STRING\"'\nMake the <Tab> key produce the given STRING.  Useful for languages\nlike Python that want to see only spaces for indentation.  This\noverrides the setting of the 'tabstospaces' option.\n\n'color [bold,][italic,]FGCOLOR,BGCOLOR \"REGEX\" ...'\nPaint all pieces of text that match the extended regular expression\n\"regex\" with the given foreground and background colors, at least\none of which must be specified.  Valid color names are: 'red',\n'green', 'blue', 'magenta', 'yellow', 'cyan', 'white', and 'black'.\nEach of these eight names may be prefixed with the word 'light' to\nget a brighter version of that color.  The word 'grey' or 'gray'\nmay be used as a synonym for 'lightblack'.\n\nOn terminal emulators that can do at least 256 colors, other valid\n(but unprefixable) color names are: 'pink', 'purple', 'mauve',\n'lagoon', 'mint', 'lime', 'peach', 'orange', 'latte', 'rosy',\n'beet', 'plum', 'sea', 'sky', 'slate', 'teal', 'sage', 'brown',\n'ocher', 'sand', 'tawny', 'brick', 'crimson', and 'normal' -- where\n'normal' means the default foreground or background color.  On such\nemulators, the color may also be specified as a three-digit\nhexadecimal number prefixed with '#', with the digits representing\nthe amounts of red, green, and blue, respectively.  This tells\n'nano' to select from the available palette the color that\napproximates the given values.\n\nThe color pair may be preceded by 'bold' and/or 'italic' (separated\nby commas) to get a bold and/or slanting typeface, if your terminal\ncan do those.\n\nAll coloring commands are applied in the order in which they are\nspecified, which means that later commands can recolor stuff that\nwas colored earlier.\n\n'icolor [bold,][italic,]FGCOLOR,BGCOLOR \"REGEX\" ...'\nSame as above, except that the matching is case insensitive.\n\n'color [bold,][italic,]FGCOLOR,BGCOLOR start=\"FROMRX\" end=\"TORX\"'\nPaint all pieces of text whose start matches extended regular\nexpression \"fromrx\" and whose end matches extended regular\nexpression \"torx\" with the given foreground and background colors,\nat least one of which must be specified.  This means that, after an\ninitial instance of \"fromrx\", all text until the first instance of\n\"torx\" will be colored.  This allows syntax highlighting to span\nmultiple lines.\n\n'icolor [bold,][italic,]FGCOLOR,BGCOLOR start=\"FROMRX\" end=\"TORX\"'\nSame as above, except that the matching is case insensitive.\n\n'include \"SYNTAXFILE\"'\nRead in self-contained color syntaxes from \"syntaxfile\".  Note that\n\"syntaxfile\" may contain only the above commands, from 'syntax' to\n'icolor'.\n\n'extendsyntax NAME COMMAND ARGUMENT ...'\nExtend the syntax previously defined as \"NAME\" with another\nCOMMAND.  This allows you to add a new 'color', 'icolor', 'header',\n'magic', 'formatter', 'linter', 'comment', or 'tabgives' command to\nan already defined syntax -- useful when you want to slightly\nimprove a syntax defined in one of the system-installed files\n(which normally are not writable).\n\nFile: nano.info,  Node: Rebinding Keys,  Prev: Syntax Highlighting,  Up: Nanorc Files\n"
                    },
                    {
                        "name": "8.3 Rebinding Keys",
                        "content": "Key bindings can be changed via the following three commands in a nanorc\nfile:\n\n'bind key function menu'\nRebinds 'key' to 'function' in the context of 'menu' (or in all\nmenus where the function exists when 'all' is used).\n\n'bind key \"string\" menu'\nMakes 'key' produce 'string' in the context of 'menu' (or in all\nmenus where the key exists when 'all' is used).  The 'string' can\nconsist of text or commands or a mix of them.  (To enter a command\ninto the 'string', precede its keystroke with 'M-V'.)\n\n'unbind key menu'\nUnbinds 'key' from 'menu' (or from all menus where the key exists\nwhen 'all' is used).\n\n\nThe format of 'key' should be one of:\n\n'^X' ---- where X is a Latin letter, or one of several ASCII\ncharacters (@, ], \\, ^, ), or the word \"Space\".  Example: '^C'.\n\n'M-X' ---- where X is any ASCII character except [, or the word\n\"Space\".  Example: 'M-8'.\n\n'Sh-M-X' ---- where X is a Latin letter.  Example: 'Sh-M-U'.  By\ndefault, each Meta+letter keystroke does the same as the\ncorresponding Shift+Meta+letter.  But when any Shift+Meta bind is\nmade, that will no longer be the case, for all letters.\n\n'FN' ---- where N is a numeric value from 1 to 24.  Example: 'F10'.\n(Often, 'F13' to 'F24' can be typed as 'F1' to 'F12' with Shift.)\n\n'Ins' or 'Del'.\n\nRebinding '^M' (Enter) or '^I' (Tab) is probably not a good idea.\nRebinding '^[' (Esc) is not possible, because its keycode is the starter\nbyte of Meta keystrokes and escape sequences.  Rebinding any of the\ndedicated cursor-moving keys (the arrows, Home, End, PageUp and\nPageDown) is not possible.  On some terminals it's not possible to\nrebind '^H' (unless '--raw' is used) because its keycode is identical to\nthat of the Backspace key.\n\n\nValid names for the 'function' to be bound are:\n\n'help'\nInvokes the help viewer.\n\n'cancel'\nCancels the current command.\n\n'exit'\nExits from the program (or from the help viewer or file browser).\n\n'writeout'\nWrites the current buffer to disk, asking for a name.\n\n'savefile'\nWrites the current file to disk without prompting.\n\n'insert'\nInserts a file into the current buffer (at the current cursor\nposition), or into a new buffer when option 'multibuffer' is set.\n\n'whereis'\nStarts a forward search for text in the current buffer -- or for\nfilenames matching a string in the current list in the file\nbrowser.\n\n'wherewas'\nStarts a backward search for text in the current buffer -- or for\nfilenames matching a string in the current list in the file\nbrowser.\n\n'findprevious'\nSearches the next occurrence in the backward direction.\n\n'findnext'\nSearches the next occurrence in the forward direction.\n\n'replace'\nInteractively replaces text within the current buffer.\n\n'cut'\nCuts and stores the current line (or the marked region).\n\n'copy'\nCopies the current line (or the marked region) without deleting it.\n\n'paste'\nPastes the currently stored text into the current buffer at the\ncurrent cursor position.\n\n'zap'\nThrows away the current line (or the marked region).  (This\nfunction is bound by default to 'Alt+Delete'.)\n\n'chopwordleft'\nDeletes from the cursor position to the beginning of the preceding\nword.  (This function is bound by default to 'Shift+Ctrl+Delete'.\nIf your terminal produces '^H' for 'Ctrl+Backspace', you can make\n'Ctrl+Backspace' delete the word to the left of the cursor by\nrebinding '^H' to this function.)\n\n'chopwordright'\nDeletes from the cursor position to the beginning of the next word.\n(This function is bound by default to 'Ctrl+Delete'.)\n\n'cutrestoffile'\nCuts all text from the cursor position till the end of the buffer.\n\n'mark'\nSets the mark at the current position, to start selecting text.\nOr, when it is set, unsets the mark.\n\n'location'\nReports the current position of the cursor in the buffer: the line,\ncolumn, and character positions.  (The old name of this function,\n'curpos', is deprecated.)\n\n'wordcount'\nCounts and reports on the status bar the number of lines, words,\nand characters in the current buffer (or in the marked region).\n\n'execute'\nPrompts for a program to execute.  The program's output will be\ninserted into the current buffer (or into a new buffer when 'M-F'\nis toggled).\n\n'speller'\nInvokes a spell-checking program, either the default 'hunspell' or\nGNU 'spell', or the one defined by '--speller' or 'set speller'.\n\n'formatter'\nInvokes a full-buffer-processing program (if the active syntax\ndefines one).\n\n'linter'\nInvokes a syntax-checking program (if the active syntax defines\none).\n\n'justify'\nJustifies the current paragraph (or the marked region).  A\nparagraph is a group of contiguous lines that, apart from possibly\nthe first line, all have the same indentation.  The beginning of a\nparagraph is detected by either this lone line with a differing\nindentation or by a preceding blank line.\n\n'fulljustify'\nJustifies the entire current buffer (or the marked region).\n\n'indent'\nIndents (shifts to the right) the current line or the marked lines.\n\n'unindent'\nUnindents (shifts to the left) the current line or the marked\nlines.\n\n'comment'\nComments or uncomments the current line or the marked lines, using\nthe comment style specified in the active syntax.\n\n'complete'\nCompletes (when possible) the fragment before the cursor to a full\nword found elsewhere in the current buffer.\n\n'left'\nGoes left one position (in the editor or browser).\n\n'right'\nGoes right one position (in the editor or browser).\n\n'up'\nGoes one line up (in the editor or browser).\n\n'down'\nGoes one line down (in the editor or browser).\n\n'scrollup'\nScrolls the viewport up one row (meaning that the text slides down)\nwhile keeping the cursor in the same text position, if possible.\n(This function is bound by default to 'Alt+Up'.  If 'Alt+Up' does\nnothing on your Linux console, see the FAQ:\n<https://nano-editor.org/dist/latest/faq.html#4.1>.)\n\n'scrolldown'\nScrolls the viewport down one row (meaning that the text slides up)\nwhile keeping the cursor in the same text position, if possible.\n(This function is bound by default to 'Alt+Down'.)\n\n'center'\nScrolls the line with the cursor to the middle of the screen.\n\n'prevword'\nMoves the cursor to the beginning of the previous word.\n\n'nextword'\nMoves the cursor to the beginning of the next word.\n\n'home'\nMoves the cursor to the beginning of the current line.\n\n'end'\nMoves the cursor to the end of the current line.\n\n'beginpara'\nMoves the cursor to the beginning of the current paragraph.\n\n'endpara'\nMoves the cursor to the end of the current paragraph.\n\n'prevblock'\nMoves the cursor to the beginning of the current or preceding block\nof text.  (Blocks are separated by one or more blank lines.)\n\n'nextblock'\nMoves the cursor to the beginning of the next block of text.\n\n'pageup'\nGoes up one screenful.\n\n'pagedown'\nGoes down one screenful.\n\n'firstline'\nGoes to the first line of the file.\n\n'lastline'\nGoes to the last line of the file.\n\n'gotoline'\nGoes to a specific line (and column if specified).  Negative\nnumbers count from the end of the file (and end of the line).\n\n'findbracket'\nMoves the cursor to the bracket (or brace or parenthesis, etc.)\nthat matches (pairs) with the one under the cursor.  *Note set\nmatchbrackets::.\n\n'anchor'\nPlaces an anchor at the current line, or removes it when already\npresent.  (An anchor is visible when line numbers are activated.)\n\n'prevanchor'\nGoes to the first anchor before the current line.\n\n'nextanchor'\nGoes to the first anchor after the current line.\n\n'prevbuf'\nSwitches to editing/viewing the previous buffer when multiple\nbuffers are open.\n\n'nextbuf'\nSwitches to editing/viewing the next buffer when multiple buffers\nare open.\n\n'verbatim'\nInserts the next keystroke verbatim into the file.\n\n'tab'\nInserts a tab at the current cursor location.\n\n'enter'\nInserts a new line below the current one.\n\n'delete'\nDeletes the character under the cursor.\n\n'backspace'\nDeletes the character before the cursor.\n\n'recordmacro'\nStarts the recording of keystrokes -- the keystrokes are stored as a\nmacro.  When already recording, the recording is stopped.\n\n'runmacro'\nReplays the keystrokes of the last recorded macro.\n\n'undo'\nUndoes the last performed text action (add text, delete text, etc).\n\n'redo'\nRedoes the last undone action (i.e., it undoes an undo).\n\n'refresh'\nRefreshes the screen.\n\n'suspend'\nSuspends the editor and returns control to the shell (until you\ntell the process to resume execution with 'fg').\n\n'casesens'\nToggles whether searching/replacing ignores or respects the case of\nthe given characters.\n\n'regexp'\nToggles whether searching/replacing uses literal strings or regular\nexpressions.\n\n'backwards'\nToggles whether searching/replacing goes forward or backward.\n\n'older'\nRetrieves the previous (earlier) entry at a prompt.\n\n'newer'\nRetrieves the next (later) entry at a prompt.\n\n'flipreplace'\nToggles between searching for something and replacing something.\n\n'flipgoto'\nToggles between searching for text and targeting a line number.\n\n'flipexecute'\nToggles between inserting a file and executing a command.\n\n'flippipe'\nWhen executing a command, toggles whether the current buffer (or\nmarked region) is piped to the command.\n\n'flipnewbuffer'\nToggles between inserting into the current buffer and into a new\nempty buffer.\n\n'flipconvert'\nWhen reading in a file, toggles between converting and not\nconverting it from DOS/Mac format.  Converting is the default.\n\n'dosformat'\nWhen writing a file, switches to writing a DOS format (CR/LF).\n\n'macformat'\nWhen writing a file, switches to writing a Mac format.\n\n'append'\nWhen writing a file, appends to the end instead of overwriting.\n\n'prepend'\nWhen writing a file, 'prepends' (writes at the beginning) instead\nof overwriting.\n\n'backup'\nWhen writing a file, creates a backup of the current file.\n\n'discardbuffer'\nWhen about to write a file, discard the current buffer without\nsaving.  (This function is bound by default only when option\n'--saveonexit' is in effect.)\n\n'browser'\nStarts the file browser (in the Read File and Write Out menus),\nallowing to select a file from a list.\n\n'gotodir'\nGoes to a directory to be specified, allowing to browse anywhere in\nthe filesystem.\n\n'firstfile'\nGoes to the first file in the list when using the file browser.\n\n'lastfile'\nGoes to the last file in the list when using the file browser.\n\n'nohelp'\nToggles the presence of the two-line list of key bindings at the\nbottom of the screen.  (This toggle is special: it is available in\nall menus except the help viewer and the linter.  All further\ntoggles are available in the main menu only.)\n\n'zero'\nToggles the presence of title bar and status bar.\n\n'constantshow'\nToggles the constant display of the current line, column, and\ncharacter positions.\n\n'softwrap'\nToggles the displaying of overlong lines on multiple screen lines.\n\n'linenumbers'\nToggles the display of line numbers in front of the text.\n\n'whitespacedisplay'\nToggles the showing of whitespace.\n\n'nosyntax'\nToggles syntax highlighting.\n\n'smarthome'\nToggles the smartness of the Home key.\n\n'autoindent'\nToggles whether a newly created line will contain the same amount\nof leading whitespace as the preceding line -- or as the next line\nif the preceding line is the beginning of a paragraph.\n\n'cutfromcursor'\nToggles whether cutting text will cut the whole line or just from\nthe current cursor position to the end of the line.\n\n'breaklonglines'\nToggles whether long lines will be hard-wrapped to the next line.\n(The old name of this function, 'nowrap', is deprecated.)\n\n'tabstospaces'\nToggles whether typed tabs will be converted to spaces.\n\n'mouse'\nToggles mouse support.\n\n\nValid names for 'menu' are:\n\n'main'\nThe main editor window where text is entered and edited.\n\n'help'\nThe help-viewer menu.\n\n'search'\nThe search menu (AKA whereis).\n\n'replace'\nThe 'search to replace' menu.\n\n'replacewith'\nThe 'replace with' menu, which comes up after 'search to replace'.\n\n'yesno'\nThe 'yesno' menu, where the Yes/No/All/Cancel question is asked.\n\n'gotoline'\nThe 'goto line (and column)' menu.\n\n'writeout'\nThe 'write file' menu.\n\n'insert'\nThe 'insert file' menu.\n\n'browser'\nThe 'file browser' menu, for selecting a file to be opened or\ninserted or written to.\n\n'whereisfile'\nThe 'search for a file' menu in the file browser.\n\n'gotodir'\nThe 'go to directory' menu in the file browser.\n\n'execute'\nThe menu for inserting the output from an external command, or for\nfiltering the buffer (or the marked region) through an external\ncommand, or for executing one of several tools.  (The old form of\nthis menu name, 'extcmd', is deprecated.)\n\n'spell'\nThe menu of the integrated spell checker where the user can edit a\nmisspelled word.\n\n'linter'\nThe linter menu, which allows jumping through the linting messages.\n\n'all'\nA special name that encompasses all menus.  For 'bind' it means all\nmenus where the specified 'function' exists; for 'unbind' it means\nall menus where the specified 'key' exists.\n\nFile: nano.info,  Node: Pico Compatibility,  Next: Building and its Options,  Prev: Nanorc Files,  Up: Top\n"
                    }
                ]
            },
            "9 Pico Compatibility": {
                "content": "'nano' emulates Pico quite closely, but there are some differences\nbetween the two editors:\n\n'Hard-Wrapping'\nUnlike Pico, 'nano' does not automatically hard-wrap the current\nline when it becomes overlong during typing.  This hard-wrapping\ncan be switched on with the '--breaklonglines' option.  With that\noption, 'nano' by default breaks lines at screen width minus eight\ncolumns, whereas Pico does it at screen width minus six columns.\nYou can make 'nano' do as Pico by using '--fill=-6'.\n\n'Scrolling'\nBy default, 'nano' will scroll just one line (instead of half a\nscreen) when the cursor is moved to a line that is just out of\nview.  And when paging up or down, 'nano' keeps the cursor in the\nsame screen position as much as possible, instead of always placing\nit on the first line of the viewport.  The Pico-like behavior can\nbe obtained with the '--jumpyscrolling' option.\n\n'Edit Area'\nPico never uses the line directly below the title bar, leaving it\nalways blank.  'nano' includes this line in the editing area, in\norder to not waste space, and because in this way it is slightly\nclearer where the text starts.  If you are accustomed to this line\nbeing empty, you can get it back with the '--emptyline' option.\n\n'Interactive Replace'\nInstead of allowing you to replace either just one occurrence of a\nsearch string or all of them, 'nano''s replace function is\ninteractive: it will pause at each found search string and query\nwhether to replace this instance.  You can then choose Yes, or No\n(skip this one), or All (don't ask any more), or Cancel (stop with\nreplacing).\n\n'Search and Replace History'\nWhen the option '-H' or '--historylog' is given (or set in a nanorc\nfile), text entered as search or replace strings is stored.  These\nstrings can be accessed with the up/down arrow keys at their\nrespective prompts, or you can type the first few characters and\nthen use 'Tab' to cycle through the matching strings.  A retrieved\nstring can subsequently be edited.\n\n'Position History'\nWhen the option '-P' or '--positionlog' is given (or set in a\nnanorc file), 'nano' will store the position of the cursor when you\nclose a file, and will place the cursor in that position again when\nyou later reopen the file.\n\n'Current Cursor Position'\nThe output of the \"Display Cursor Position\" command ('^C') displays\nnot only the current line and character position of the cursor, but\nalso (between the two) the current column position.\n\n'Spell Checking'\nIn the internal spell checker misspelled words are sorted\nalphabetically and trimmed for uniqueness, such that the words\n'apple' and 'Apple' will be prompted for correction separately.\n\n'Writing Selected Text to Files'\nWhen using the Write-Out key ('^O'), text that has been selected\nusing the marking key ('^^') can not just be written out to a new\n(or existing) file, it can also be appended or prepended to an\nexisting file.\n\n'Reading Text from a Command'\nWhen using the Read-File key ('^R'), 'nano' can not just read a\nfile, it can also read the output of a command to be run ('^X').\n\n'Reading from Working Directory'\nBy default, Pico will read files from the user's home directory\n(when using '^R'), but it will write files to the current working\ndirectory (when using '^O').  'nano' makes this symmetrical: always\nreading from and writing to the current working directory -- the\ndirectory that 'nano' was started in.\n\n'File Browser'\nIn the file browser, 'nano' does not implement the Add, Copy,\nRename, and Delete commands that Pico provides.  In 'nano' the\nbrowser is just a file browser, not a file manager.\n\n'Toggles'\nMany options which alter the functionality of the program can be\n\"toggled\" on or off using Meta key sequences, meaning the program\ndoes not have to be restarted to turn a particular feature on or\noff.  *Note Feature Toggles:: for a list of options that can be\ntoggled.  Or see the list at the end of the main internal help text\n('^G') instead.\n\nFile: nano.info,  Node: Building and its Options,  Prev: Pico Compatibility,  Up: Top\n",
                "subsections": []
            },
            "10 Building and its Options": {
                "content": "Building 'nano' from source is straightforward if you are familiar with\ncompiling programs with autoconf support:\n\ntar -xf nano-x.y.tar.gz\ncd nano-x.y\n./configure\nmake\nmake install\n\nThe possible options to './configure' are:\n\n'--disable-browser'\nExclude the file browser that can be called with '^T' when wanting\nto read or write a file.\n\n'--disable-color'\nExclude support for syntax coloring.  This also eliminates the '-Y'\ncommand-line option, which allows choosing a specific syntax.\n\n'--disable-comment'\nExclude the single-keystroke comment/uncomment function ('M-3').\n\n'--disable-extra'\nExclude the Easter egg: a crawl of major contributors.\n\n'--disable-help'\nExclude the help texts ('^G').  This makes the binary much smaller,\nbut also makes it difficult for new users to learn more than very\nbasic things about using the editor.\n\n'--disable-histories'\nExclude the code for handling the history files: the search and\nreplace strings that were used, the commands that were executed,\nand the cursor position at which each file was closed.  This also\neliminates the '-H' and '-P' command-line options, which switch on\nthe storing of search/replace strings, executed commands, and\ncursor positions.\n\n'--disable-justify'\nExclude the text-justification functions ('^J' and 'M-J').\n\n'--disable-libmagic'\nExclude the code for using the library of magic-number tests (for\ndetermining the file type and thus which syntax to use for coloring\n-- in most cases the regexes for filename and header line will be\nenough).\n\n'--disable-linenumbers'\nExclude the ability to show line numbers.  This also eliminates the\n'-l' command-line option, which turns line numbering on.\n\n'--disable-mouse'\nExclude all mouse functionality.  This also eliminates the '-m'\ncommand-line option, which enables the mouse functionality.\n\n'--disable-multibuffer'\nExclude support for opening multiple files at a time and switching\nbetween them.  This also eliminates the '-F' command-line option,\nwhich causes a file to be read into a separate buffer by default.\n\n'--disable-nanorc'\nExclude support for reading the nanorc files at startup.  With such\nsupport, you can store custom settings in a system-wide and a\nper-user nanorc file rather than having to pass command-line\noptions to get the desired behavior.  *Note Nanorc Files:: for more\ninfo.  Disabling this also eliminates the '-I' command-line option,\nwhich inhibits the reading of nanorc files.\n\n'--disable-operatingdir'\nExclude the code for setting an operating directory.  This also\neliminates the '-o' command-line option, which sets the operating\ndirectory.\n\n'--disable-speller'\nExclude the code for spell checking.  This also eliminates the '-s'\ncommand-line option, which allows specifying an alternate spell\nchecker.\n\n'--disable-tabcomp'\nExclude tab completion (when nano asks for a filename or search\nstring or replace string or command to execute).\n\n'--disable-wordcomp'\nExclude word completion ('^]').\n\n'--disable-wrapping'\nExclude all hard-wrapping of overlong lines.  This also eliminates\nthe '-b' and '-w' command-line options, which switch automatic\nlong-line wrapping on and off, respectively.\n\n'--enable-tiny'\nThis option implies all of the above.  It also disables some other\ninternals of the editor, like the function toggles, the marking of\ntext, the undo/redo code, line anchors, the recording and playback\nof a macro, softwrapping, and the cut-to-end-of-line code.  These\nthings stay disabled also when using the enabling counterpart of\nthe above options together with '--enable-tiny' to switch specific\nfeatures back on.\n\n'--enable-debug'\nInclude some code for runtime debugging output.  This can get\nmessy, so chances are you only want this feature when you're\nworking on the nano source.\n\n'--disable-nls'\nExclude Native Language support.  This will disable the use of any\navailable GNU 'nano' translations.\n\n'--enable-utf8'\nInclude support for handling and displaying Unicode files.  This\nrequires a \"wide\" version of the curses library.\n\n'--disable-utf8'\nExclude support for handling and displaying Unicode files.\nNormally the configure script auto-detects whether to enable UTF-8\nsupport or not.  You can use this or the previous option to\noverride that detection.\n\n'--enable-altrcname=NAME'\nUse the file with the given NAME (in the user's home directory) as\nnano's settings file, instead of the default '.nanorc'.\n\n",
                "subsections": []
            }
        }
    }
}