NANORC(5) File Formats Manual NANORC(5) nanorc - (GNU nano) nanorc nano. --rcfile nano : /etc/nanorc ( ) ~/.nanorc $XDG_CONFIG_HOME/nano/nanorc ~/.config/nano/nanorc . --rcfile nano . 9.0 ( ) . --solo set solosidescroll nanorc . 9.0 M-< M-> `scrollleft` `scrollright`. 9.0 nanorc : bind M-< prevbuf main bind M-> nextbuf main 8.0 ^F ^B M-F M-B . 8.0 nanorc : bind ^F forward main bind ^B back main bind M-F formatter main bind M-B linter main set unset . -- . nano . . nanorc nanorc. . unset nanorc nanorc . . characters . . : set afterends Ctrl+Right Ctrl+Delete . set allow_insecure_backup ( ) . . set atblanks ( ) . set autoindent ( ). set backup (~) . set backupdir directory -- set backup --backup -B. directory . set boldtext . titlecolor statuscolor promptcolor minicolor keycolor numbercolor / selectedcolor. set bookstyle (justifying) ( ). set brackets "characters" . . ( set punct) . ""')>]}". set breaklonglines -- : set fill ( ). set casesensitive . set colonparsing . . . +1 . set constantshow . quickblank. set cutfromcursor . set emptyline . set errorcolor [bold,][italic,]fgcolor,bgcolor . bold,white,red. set titlecolor . set fill number number . 0 number . -8. set functioncolor [bold,][italic,]fgcolor,bgcolor . set titlecolor . set guidestripe number . ( set stripecolor.) set historylog . set indicator " " . . set jumpyscrolling . set keycolor [bold,][italic,]fgcolor,bgcolor . set titlecolor . set linenumbers . ( .) set locking vim . set magic libmagic . ( libmagic .) set matchbrackets "characters" . . . "(<[{)>]}". set minibar . " " . ( Unicode: U+xxxx) set stateflags ( ). . [i/n] . --constantshow M-C. --stateflags. set minicolor [bold,][italic,]fgcolor,bgcolor . ( .) set titlecolor . set mouse . () . X gpm. Shift. set multibuffer ^R . set noconvert DOS/Mac. set nohelp . set nonewlines . ( POSIX.) set nowrap . unset breaklonglines . set numbercolor [bold,][italic,]fgcolor,bgcolor . set titlecolor . set operatingdir directory nano directory . set positionlog . 200 . set preserve XOFF XON ( ^S ^Q) ( ). set promptcolor [bold,][italic,]fgcolor,bgcolor . ( .) set titlecolor . set punct "characters" . . ( set brackets) . "!.?". set quickblank 20. constantshow . minibar zero quickblank 0.8 1.5 . set quotestr "regex" . "^([ \t]*([!#%:;>|}]|//))+". ( \t .) . set rawsequences ncurses . ( terminfo . ssh BSD .) nano. set rebinddelete Delete Backspace . Backspace Delete Delete Backspace. set regexp . nano (ERE). set saveonexit (^X) . set scrollercolor fgcolor,bgcolor "scrollbar". set titlecolor . set selectedcolor [bold,][italic,]fgcolor,bgcolor . set titlecolor . set showcursor . set smarthome Home . Home ( ). . set softwrap . ( set atblanks .) set solosidescroll . . -- nano. set speller "program [argument ...]" program hunspell(1) spell(1). set spotlightcolor [bold,][italic,]fgcolor,bgcolor . black,lightyellow. set titlecolor . set stateflags : I M L ( ) R S . (*) . set statuscolor [bold,][italic,]fgcolor,bgcolor . set titlecolor . set stripecolor [bold,][italic,]fgcolor,bgcolor . set titlecolor . set tabsize number number . number 0. 8. set tabstospaces -- . (: .) set titlecolor [bold,][italic,]fgcolor,bgcolor . : red green blue magenta yellow cyan white black. light . grey gray lightblack. light . 256 ( ) : pink purple mauve lagoon mint lime peach orange latte rosy beet plum sea sky slate teal sage brown ocher sand tawny brick crimson normal -- normal . # . nano . "fgcolor" ",bgcolor" bold / italic ( ) / . set trimblanks . set unix (Unix). . ( set noconvert .) set whitespace "characters" . . UTF-8 ">>." ">.". set wordbounds . set wordchars "characters" ( ) . wordbounds. set zap Backspace Delete ( ). set zero ( ) . 1.5 . M-Z . M-X . ( color ). . nano. nano POSIX. . ? * + ^ $ . . ? * + ^ $ \< \> \s . (lookahead) (lookbehind) . GNU grep: man grep. nanorc (""). . . ([]). : syntax name ["fileregex" ...] name. color syntax . nano ( ) fileregex. ( ) -Y --syntax name. default : fileregex . none . header "regex" ... fileregex regex ( ) . magic "regex" ... fileregex header regex ( ) magic . ( libmagic --magic set magic.) formatter program [argument ...] program . linter program [argument ...] program . comment "string" string . (| ) "/*|*/" CSS. . "#" . / "" JSON. "#". tabgives "string" string . . tabstospaces. color [bold,][italic,]fgcolor,bgcolor "regex" ... regex . : red green blue magenta yellow cyan white black. light . grey gray lightblack. light . 256 ( ) : pink purple mauve lagoon mint lime peach orange latte rosy beet plum sea sky slate teal sage brown ocher sand tawny brick crimson normal -- normal . #, . nano . bold / italic ( ) / . . icolor [bold,][italic,]fgcolor,bgcolor "regex" ... . color [bold,][italic,]fgcolor,bgcolor start="fromrx" end="torx" fromrx torx . fromrx torx. . icolor [bold,][italic,]fgcolor,bgcolor start="fromrx" end="torx" . include "syntaxfile" syntaxfile. syntaxfile syntax icolor. extendsyntax name command argument ... name command. color icolor header magic formatter linter comment tabgives -- ( ). : bind key function menu key function menu ( all). bind key "string" menu key string menu ( all). / string . . {{}. unbind key menu key menu ( all). bind key "{function}" menu bind key function menu nano function menu ( ) nano function . ( ). . key : ^X X ASCII (@, ], \, ^, _) "Space". : ^C. M-X X ASCII ( [) "Space" "Left" "Right" "Up" "Down". : M-8. Sh-M-X X . : Sh-M-U. Meta+letter Shift+Meta+letter . Shift+Meta . FN N 1 24. : F10. ( F13 F24 F1 F12 Shift.) Ins Del. ^M ( Enter) ^I ( Tab) . ^[ ( Esc) Meta . ( Home End PageUp PageDown) . ^H ( --raw) (Backspace). function : help . cancel . exit ( ). writeout . savefile . insert ( ) multibuffer . whereis -- . wherewas -- . findprevious . findnext . replace . cut ( ) . copy ( ) . paste . zap ( ). ( .) chopwordleft . ( . ^H ^H .) chopwordright . ( .) cutrestoffile . mark . . location : . wordcount ( ). execute . -- M-F. (|) ( ) ( ). speller hunspell(1) GNU spell(1) --speller set speller. formatter ( ). ( .) linter ( ). "filename:linenum:charnum: some message" "some message" . ^C . justify ( ). . . fulljustify ( ). indent ( ) . unindent ( ) . comment . complete ( ) . left ( ). right ( ). up ( ). down ( ). scrollleft . ( M-<.) scrollright . . . ( M->.) scrollup ( ) . ( M-Up. M-Up : .) scrolldown ( ) . ( M-Down.) center . cycle . prevword . nextword . home . end . beginpara . endpara . prevblock . ( .) nextblock . toprow . bottomrow . pageup . pagedown . firstline . lastline . gotoline ( ). ( ). ++ -- . findbracket ( .) () . set matchbrackets. anchor . ( .) prevanchor . nextanchor . prevbuf / . nextbuf / . verbatim . tab . enter . delete . backspace . recordmacro -- . . runmacro . undo ( ). redo ( ). refresh . suspend ( fg). casesens / . regexp / . backwards / . older () . newer () . flipreplace . flipgoto . flipexecute . flippipe ( ) . flipnewbuffer . flipconvert DOS/Mac. . dosformat DOS (CR/LF). macformat Mac. append . prepend "" ( ) . backup . discardbuffer ( Write Out). nano 2. browser ( Read File Write Out) . gotodir . firstfile . lastfile . nohelp . ( : . .) zero . constantshow ( ) . softwrap . linenumbers . whitespacedisplay . nosyntax . smarthome Home. autoindent -- . cutfromcursor . breaklonglines . tabstospaces . mouse . : main . help . search ( __). replace ' '. replacewith ' ' ' '. yesno '_' ///. gotoline ' ()'. writeout ' '. insert ' '. browser ' ' . whereisfile ' ' . gotodir ' ' . execute ( ) . spell . linter (linter) . all . bind unbind . Ctrl+Z : bind ^Z suspend main Shift+Alt+C : bind Sh-M-C "{execute}| xsel -ib {enter}{undo}" main /etc/nanorc . ~/.nanorc $XDG_CONFIG_HOME/nano/nanorc ~/.config/nano/nanorc . /usr/share/nano/* ( extra/). nano(1) https://nano-editor.org/cheatsheet.html . 3 . . : . 2026 9.0 NANORC(5)