Nano 8.1

GNU nano is a console text editor, modeled after Pico. It is very newcomer-friendly due to on-screen menus with always visible keyboard shortcuts. Keybindings are configurable, and full undo and redo actions are supported. Nano can even be used as STDIN pager, and it provides fast syntax highlighting using regular expressions.

Tags editor text-editor terminal console pico syntax-highlighting
License GNU GPL
State stable

Recent Releases

8.114 Jul 2024 11:25 minor feature: "de dag van de bitterkoekjespudding". The idiom `nano filename:linenumber` is understood only when the. Option --colonparsing (or 'set colonparsing') is used. Modern bindings are *not activated when nano's invocation name. Starts with "e", as it jars with Debian's alternatives system. New bindable function 'cycle' first centers the current row. Then moves it to the top of the viewport, then to the bottom. It is bound by default to L. Option --listsyntaxes/-z lists the names of available syntaxes.
8.002 May 2024 15:25 major documentation: "Grus grus". By default F is bound to starting a forward search, and B to. Starting a backward search, while M-F and M-B repeat the search in the corresponding direction. (See the documentation if you. Want the old bindings back.) Command-line option --modernbindings (-/) makes Q quit, X cut. C copy, V paste, Z undo, Y redo, O open a file, W write a. File, R replace, G find again, D find again backwards, A set The mark, T jump to a line, P show the position, and E execute. Above modern bindings are activated also when the name of nano's. Executable (or a symlink to it) starts with the letter "e". To open a file at a certain line number, one can now use also. `nano filename:number`, besides `nano +number filename`. and put the cursor on the first and last. Row in the viewport, while retaining the horizontal position. When the three digits in an #RGB color code are all the same. The code is mapped to the xterm grey scale, giving access to Fourteen levels of grey instead of just four. For easier access, M-" is bound to placing/removing an anchor. And M-' to jumping to the next anchor. Whenever an error occurs, the keystroke buffer is cleared, thus. Stopping the execution of a macro or a string bind. The mousewheel scrolls the viewport instead of moving the cursor.
7.220 Jan 2023 06:45 minor bugfix: * Shift+Insert is prevented from pasting in view mode.
7.114 Dec 2022 15:48 minor bugfix: * When --autoindent and --breaklonglines are combined, pressing Enter at a specific position no longer eats characters.
7.015 Nov 2022 19:00 minor feature: * In string binds, each bindable function name between braces will be executed. * Unicode codes can be entered (via M-V) without leading zeroes, by finishing short codes with Space or Enter. * Word completion looks for candidates in all open buffers. * No regular expression matches the final empty line any more.
6.402 Aug 2022 14:45 minor bugfix: * The file browser does not crash when moving up to the root folder. * Softwrapping very long lines is done more efficiently. * Invoking the formatter does not blink the screen.
6.328 Apr 2022 14:58 minor bugfix: * For multiline regexes, text is now colored as soon a start match is found, also when there is no end match at all. * The colorizing of any line is stopped after two thousand bytes, to avoid frustrating delays. * When environment variable NO_COLOR is set, the two default colors (yellow for the spotlight, red for error messages) are suppressed when no interface colors are specified in a nanorc file. * Utility 'xsel' can be used to copy a marked region to the system's clipboard. See the sample nanorc for an example.
6.218 Feb 2022 15:44 minor bugfix: * The file browser clears the prompt bar also when using --minibar. * Linting now works also with a newer 'pyflakes'.
6.109 Feb 2022 16:34 minor bugfix: * The behavior of Ctrl+K at a prompt has been enhanced: when there is text after the cursor, just this text is erased. * At a prompt, Alt+6 copies the current answer into the cutbuffer. * Large external pastes into nano are handled more quickly.
6.015 Dec 2021 17:53 minor feature: * Option --zero hides the title bar, status bar and help lines, and uses all rows of the terminal as editing area. The title bar and status bar can be toggled with M-Z. * Colors can now be specified also as three-digit hexadecimal numbers, in the format #rgb. This picks from the 216 index colors (that most terminals know) the color that is nearest to the given values. * For users who dislike numbers, there are fourteen new color names: rosy, beet, plum, sea, sky, slate, teal, sage, brown, ocher, sand, tawny, brick, and crimson. * Suspension is enabled by default, invokable with T Z. The options -z, --suspendable, and 'set suspendable' are obsolete and ignored. (In case you want to be able to suspend nano with a single keystroke, you can put 'bind Z suspend main' in your nanorc.) * When automatic hard-wrapping is in effect, pasting just a few words (without a line break) will now hard-wrap the line when needed. * Toggling Append or Prepend clears the current filename. * The word count as shown by M-D is now affected by option --wordbounds; with it, nano counts words as 'wc' does; without it (the new default), words are counted in a more human way: seeing punctuation as space.
5.906 Oct 2021 17:44 minor bugfix: * The extension of a filename is added to the name of a corresponding temporary file, so that spell checking a C file, for example, will check only the comments and strings (when using 'aspell'). * The process number is added to the name of an emergency save file, so that when multiple nanos die they will not fight over a filename. * Undoing a cutting operation will restore an anchor that was located in the cut area to its original line. * When using --locking, saving a new buffer will create a lock file. * Syntax highlighting for YAML files has been added.
5.815 Jun 2021 17:02 minor bugfix: * After a search, the spotlighting is dropped after 1.5 seconds (0.8 seconds with --quick) to avoid the idea that the text is selected. * A + and a space before a filename on the command line will put the cursor at the end of the corresponding buffer. * Linter messages no longer include filename and line/column numbers. * Color name "grey" or "gray" can be used instead of "lightblack". * The color of the minibar can be chosen with 'set minicolor'.
5.729 Apr 2021 14:55 minor bugfix: * The output of --constantshow (without --minibar) is more stable. * When opening multiple buffers and there is an error message, this message is shown again upon first switch to the relevant buffer. * The position and size of the indicator now follow actual lines, instead of visual lines when in softwrap mode, meaning that the size of the indicator can change when scrolling in softwrap mode.
5.6.103 Mar 2021 15:07 minor bugfix: "Geelgors". Search matches are properly colorized in softwrap mode too. Option 'highlightcolor' has been renamed to 'spotlightcolor'.
5.624 Feb 2021 15:48 minor feature: "Wielewaal" A search match gets highlighted (in black on yellow by default), in addition to placing the cursor at the start of the match. The color combination can be changed with 'set highlightcolor'. By default the cursor is hidden until the next keystroke, but it can be forced on with --showcursor / 'set showcursor'. Option --markmatch / 'set markmatch' has been removed. Cursor position and character code are displayed in the minibar only when option --constantshow / 'set constantshow' is used, and their display can be toggled with M-C. The state flags are displayed in the minibar only when option --stateflags / 'set stateflags' is used.
5.514 Jan 2021 15:21 minor feature: "Rebecca". Option 'set minibar' makes nano suppress the title bar and instead show a bar with basic editing information at the bottom: file name (plus an asterisk when the buffer is modified), the cursor position (line,column), the character under the cursor (U+xxxx), the flags that --stateflags normally shows, plus the percentage of the buffer that is above the cursor. With 'set promptcolor' the color combination of the prompt bar can be changed, to allow contrasting it with the mini bar (which always has the same color as the title bar). Option 'set markmatch' highlights the result of a successful search by putting the mark at the end of the match, making the match more visible. It also suppresses the cursor until the next keystroke. (If you dislike the hiding of the cursor, use 'set showcursor'.) The bindable toggle 'nowrap' has been renamed to 'breaklonglines', to match the corresponding option, like for all other toggles. Support for Slang has been removed.
5.402 Dec 2020 20:44 minor feature: "Terre des hommes" Moving the cursor now skips over combining characters (and other zero-width characters). Deleting a character deletes also any succeeding zero-width characters, but backspacing deletes just one character at a time.
5.307 Oct 2020 12:09 minor feature: "Revolution!" Option 'set stateflags' makes nano show the state of auto-indenting, the mark, hard-wrapping, macro recording, and soft-wrapping in the title bar. The flags take the place of "Modified", and a modified buffer is instead indicated by an asterisk (*) after its name. Nano no longer by default tries using libmagic to determine the type of a file (when neither filename nor first line gave a clue), because in most cases it is a waste of time. It requires using the option --magic or -! or 'set magic' to make nano try libmagic. The color of the indicator can be changed with 'set scrollercolor'.
5.224 Aug 2020 13:53 minor bugfix: "Ranrapalca". Making certain replacements after a large paste does not crash. Hitting a toggle at the Search prompt does not clear the answer. Using --positionlog does not complain at the first start. A macro containing a Search command will not sometimes fail.
5.113 Aug 2020 04:05 minor bugfix: "Cantabria". M-Bsp (Alt+Backspace) deletes a word backwards, like in Bash. M- has become bindable. (Be careful, though: as it is the. Starting combination of many escape sequences, avoid gluing it together with other keystrokes, like in a macro.). With --indicator and --softwrap, the first keystroke in an. Empty buffer does not crash. Invoking the formatter while text is marked does not crash. In UTF-8 locales, an anchor is shown as a diamond.
5.030 Jul 2020 15:05 major feature: "Among the fields of barley". With --indicator (or -q or 'set indicator') nano will show a kind of scrollbar on the righthand side of the screen to indicate where in the buffer the viewport is located and how much it covers. With any line can be "tagged" with an anchor, and. and will jump to the nearest anchor. When using line numbers, an anchor is shown as "+" in the margin. The Execute Command prompt is now directly accessible from the. Main menu (with T, replacing the Spell Checker). The Linter, Formatter, Spell Checker, Full Justification, Suspension, and Cut-Till-End functions are available in this menu too. On terminals that support at least 256 colors, nine new color. Names are available: pink, purple, mauve, lagoon, mint, lime, Peach, orange, and latte. These do not have lighter versions. For the color names red, green, blue, yellow, cyan, magenta. White, and black, the pre'light' gives a brighter color. Pre'bright' is deprecated, as it means both bold AND light. All color names can be preceded with "bold," and/or "italic,". (in that order) to get a bold and/or italic typeface. With --bookstyle (or -O or 'set bookstyle') nano considers any. Line that begins with whitespace as the start of a paragraph. Refreshing the screen with L now works in every menu. In the main menu, L also centers the line with the cursor. Toggling the help lines with M-X now works in all menus except in the help viewer and the linter. At a filename prompt, the first lists the possibilities. And these are listed near the bottom instead of near the top. Bindable function 'curpos' has been renamed to 'location'. Long option --tempfile has been renamed to --saveonexit. Short option -S is now a synonym of --softwrap. The New Buffer toggle (M-F) has become non-persistent. Options. --multibuffer and 'set multibuffer' still make it default to on. Backup files will retain their group ownership (when possible). Data is synced to dis
4.9.326 May 2020 09:25 minor bugfix: "Almendras". One more introduced in version 4.9 is : a crash when. The terminal screen is resized while at a lock-file prompt.
4.9.209 Apr 2020 07:05 minor bugfix: "Mali Lošinj". Another introduced in version 4.9 is : a likely crash. After undoing an at the end of leading whitespace.
4.9.102 Apr 2020 02:45 minor bugfix: "Sapperdeflap". Two introduced in version 4.9 are : the cursor. Getting misplaced when undoing line cuts, and filtering of the whole buffer to a new buffer not working.
4.926 Mar 2020 04:05 minor feature: "die fetten Jahre sind vorbei". When justifying a selection, the new paragraph and the. Succeeding one get the appropriate first-line indent. Trying to justify an empty selection does not crash. Redoing the insertion of an empty file does not crash. On the BSDs and macOS, H has become rebindable again. (in most terminal emulators, not on the console). DOS line endings in nanorc files are accepted. Option --suspend / 'set suspend' has been renamed to. The more logical --suspendable / 'set suspendable'.
4.808 Feb 2020 22:45 minor bugfix: "Jaška". When something is pasted into nano, auto-indentation is suppressed. And the paste can be undone as a whole with a single M-U. When a lock file is encountered during startup, pressing C/Cancel. Quits nano. (Pressing 'No' just skips the file and continues.) Shift+Meta+letter key combos can be bound with 'bind Sh-M-letter'. Making any such binding dismisses the default behavior of ignoring Shift for all Meta+letter keystrokes. The configuration option --with-slang (to be avoided when possible). Can now be used only together with --enable-tiny. A custom nanorc file can be specified on the command line, with. -f filename or --rcfile=filename.
4.724 Dec 2019 14:25 minor bugfix: "Havikskruid". A will indent a marked region only when mark and cursor are on different lines. Two indentations (any mix of tabs and spaces) are considered the. Same when they look the same (that is: indent to the same level). When using --breaklonglines or J, a line will never be broken in. Its leading whitespace or quoting. The keywords in nanorc files must be in lowercase.
4.630 Nov 2019 11:05 minor bugfix: "And don't you eat that yellow snow". The 'formatter' command has returned, bound by default to M-F. It allows running a syntax-specific command on the contents of. The buffer. T will try to run 'hunspell' before 'spell', because it checks. Spellling for the locale's language and understands UTF-8. Multiple errors or warnings on startup will no longer slow nano. Down but will be indicated on the status bar with trailing dots.
4.505 Oct 2019 01:13 minor feature: "Košice" The new 'tabgives' command allows you to specify per syntax what the key should produce: some spaces, a hard TAB, ... The output of --help is properly aligned again for all languages. will indent a marked region also when M- has been rebound.
4.203 May 2019 21:44 major bugfix: 2019 April 24 - GNU nano 4.2 "Tax the rich, pay the teachers" The integrated spell checker does not crash when 'spell' is missing. Option --breaklonglines works also when --ignorercfiles is used. Automatic hard-wrapping is more persistent in pushing words to the same overflow line.
4.011 Apr 2019 01:05 major feature: An overlong line is no longer automatically hard-wrapped. Smooth scrolling (one line at a time) has become the default. A newline character is no longer automatically added at end of buffer. The line below the title bar is by default part of the editing space. Option --breaklonglines (-b) turns automatic hard-wrapping back on. Option --jumpyscrolling (-j) gives the chunky, half-screen scrolling. Option --finalnewline (-f) brings back the automatic newline at EOF. Option --emptyline (-e) leaves the line below the title bar unused. and now do a linewise scroll instead of a findnext. Any number of justifications can be undone (like all other operations). When marked text is justified, it becomes a single, separate paragraph. Option --guidestripe= draws a vertical bar at the given column. Option --fill= no longer turns on automatic hard-wrapping. When a line continues offscreen, it now ends with a highlighted " ". The halfs of a split two-column character are shown as " " and " ". A line now scrolls horizontally one column earlier. The bindable functions 'cutwordleft' and 'cutwordright' were renamed to 'chopwordleft' and 'chopwordright' as they don't use the cutbuffer. The paragraph-jumping functions were moved from Search to Go-to-Line. Option --rebinddelete is able to compensate for more misbindings. Options --morespace and --smooth are obsolete and thus ignored. The --disable-wrapping-as-root configure option was removed.
2.921 Nov 2017 07:45 minor feature: 0 "Eta" introduces the ability to record and Replay keystrokes (M-: to start and stop recording, M-; to play the macro back), makes Q and S do something. Useful by default ( Q starts a backward search, and S Saves the current file), changes W to start always a Forward search, shows the number of open buffers (when More than one) in the title bar, no longer asks to press Enter when there are errors in an rc file, retires the. Options '--quiet' and 'set quiet' and 'set backwards', Makes indenting and unindenting undoable, will look in XDG_CONFIG_HOME for a nanorc file and in XDG_DATA_HOME. For the history files, adds a history stack for executed Commands ( R X), does not overwrite the position-history File of another nano, and a score of tiny.
2.802 Apr 2017 04:05 minor feature: 0 "Axat" makes it easier to move around in Softwrapped lines: the Up and Down keys now step from Visual row to visual row instead of jumping between Logical lines, and the Home and End keys now move to The start and end of a row, and only when already There, then to the start and end of the logical line. Furthermore, the screen can now scroll per row instead of always per logical line. On an entirely different. Front: nano now makes use of gnulib, to make it build on more platforms. In short: there were many internal. Changes, not many user-visible ones (apart form the New softwrap navigation). The conversion to gnulib Was done by Mike Frysinger, the softwrap overhaul by David Ramsey.
2.729 Dec 2016 17:25 minor feature: 3 "Ontbijtkoek" wipes away a handful of : Your editor is now able to handle filenames that contain Newlines, avoids a brief flash of color when switching Between buffers that are governed by different syntaxes, Makes the Shift+Ctrl+Arrow keys select text again on a Linux console, is more resistant against malformations in the positionlog file, and does not crash when C is. Typed on systems where it produces the code KEY_CANCEL. Oh, and it no longer mistakenly warns about editing an. Unlocked file just after saving a new one. That's it. Tastes great with thick butter.
2.5.326 Feb 2016 19:45 minor bugfix: This release Contains for like: stray cursor positioning Errors, many many memory leaks including file reading, Using the file browser, searching for multi-byte characters, History completion, and many other places. New features include the ability to trim whitespace. From the ends of lines when justifying text, see nanorc(5) Option justifytrim for deets. As always thank you for your Continued support of nano, and keep sparing.
2.5.214 Feb 2016 00:25 minor bugfix: This release includes Several for various memory leaks, position history Size growth, and a long standing with using Nano under sudo creating root-owned files. There are also The usual bevy of documentation and other miscellaneous And touch ups. Upgrade today while supplies last, Operators are standing by!
2.5.111 Jan 2016 07:05 minor bugfix: It includes for a syntax-highlighting and a positionlog, it Disables a time-eating multiline regex in the C syntax, And it adds an escape hatch to the WriteOut menu when --tempfile is used: the discardbuffer command, Q. It. Also has translation updates for fifteen languages, and a small in the softwrap code. So... you are heartily. Invited to upgrade. Enjoy!
2.5.007 Dec 2015 19:25 major bugfix: 5 series, is now available. Please note that as of this release. There will no longer be separate stable and unstable Branches. The development team will prioritize as Needed, and make new releases in proportion to the Severity of the which are. This release includes many of the now in 2.4.3, as well as color synax highlighting improvements. Undo, and many more improvements! Thank you for Using nano!
2.429 Nov 2015 09:45 major bugfix: 3 "Apocalypse" is now available for your Downloading pleasure. This release includes a myriad of including several memory leaks, with. Color syntax higlighting, search/replace, file Insertion and help menu. Many thanks to Benno Schulenberg for tireless efforts on the vast. Majority of for some time now. As always please Report via the Savannah page, and remember to Share and Enjoy.
2.4.207 Jul 2015 00:45 minor feature: This release includes several fixes, including the ability to resize when in modes other than the main editing window, proper displaying of invalid UTF-8 bytes, new syntax definitions for Elisp, Guile, and PostgreSQL, and better display of shortcuts in the help menu and file browser. Thanks for your patience and using nano!.
2.4.115 Apr 2015 17:45 documentation: This release includes several fixes for issues with the file browser menu, linter and formatter functions, spell checker, undo/redo with some specific marked-cutting situations, and some small improvements to the color syntax highlighting definitions. There are also various documentation and code comment updates included, and finally, fixes for compilation on non-GNU/Linux systems and certain configure combinations. Toasters!.
2.4.024 Mar 2015 06:05 major feature: This is the first stable release in many years, and brings together many new features from the 2.3 series, including: a fully functional undo system (now enabled by default), vim-compatible file locking, linter support, formatter support, syntax highlighting flexibility, and many fixes for issues reported since 2.2.
2.3.99pre301 Mar 2015 00:45 major documentation: This is likely to be the last release before the nexy major release. Please test it out and send us any feedback via the Savannah bug page for nano This release includes fixes for rebinding toggles via nanorc, several memory alignment fixes, and documentation and build updates. As always thank you for using nano - Share and Enjoy!
2.3.99pre208 Feb 2015 06:05 minor feature: This release contains only fixes, including: a long-standing problem with cutting in nano-tiny, several memory alignment improvements, and issues with leftover file locks. Please keep reporting bugs so we can geta happy and healthy 2.4.0 soon. Thanks for using nano!