GNU Nano, an intuitive and efficient text editor for the terminal
The release of one of the most famous Linux text editors, GNU nano 8.0 with the code name »Grus grus» and in this new version several new features are presented, ranging from the addition of modern keyboard shortcuts to the implementation of improvements in color representation and resolution of numerous bugs.
For those who do not know about nano, you should know that this is a text editor designed for Unix systems that is based on curses and which is present in many Linux distributions. It is a similar version of Pico, the Pine email editor. Nano includes features that Pico doesn't have, such as syntax highlighting, line numbers, regular expression search and replace, line-by-line scrolling, multiple buffers, line group indentation, and undo and redo changes. Like Pico, Nano is primarily controlled via key combinations. For example, "Ctrl+ O" is used to save the current file.
Featured features of GNU nano 8.0 “Grus grus”
One of the most important features of this new version of Nano 8.0 is “–modernbindings” (“-/”)” command line option which overrides the default keyboard shortcutss, this with the purpose of offering intuitive combinations and improving the user experience for both novices and editor users. New shortcuts have been assigned to actions such as cut, copy, paste, undo, redo, open and save
Another change that Nano 8.0 presents is in the navigation, as improvements are introduced including the ability to open a file at a specific line number in a file when opening it with the command “nano filename:number”, in addition to the previously supported option “+N” (“nano +number filename”). New have been addeds key combinations like and that allow you to move the cursor in the first and last row of the display window, maintaining the horizontal position.
In addition, in Nano 8.0 An alternative set of hotkeys have been enabled when running Nano using an executable file or a symbolic link beginning with the letter "e", the specification of equal color components in #RGB values has been improved, now allowing the use of fourteen gray levels instead of simply four when the three digits of a #RGB color code are the same.
Default hotkeys for search have been reassigned. Now, «^F» starts a forward search and «^B» starts a backward search. Additionally, "MF" and "MB" repeat searches forward and backward, respectively, and hotkeys have been added " " and " »,
Of the other changes that it presents this new version of Nano 8.0
- In the case of errors, the keystroke buffer is now cleared, stopping the execution of any macro or key combination.
- The mouse wheel now scrolls the window instead of moving the cursor, providing intuitive interaction.
- The hot keys «'M-'» are now used to set and delete a mark, while «'M-'» is used to move to the next mark.
- Changed the behavior when rolling the mouse wheel: it now scrolls the visible area instead of moving the cursor.
- Numerous fixes that occurred when performing tasks such as text formatting, search and replace, and undo operations
- Addressed security vulnerabilities such as buffer overflow, memory leaks, and invalid reads, ensuring greater program reliability.
- UI adjustments
- Navigation improvements
- Improvements in handling multiple languages.
Interested in knowing more about it, you can consult the details in the following link
How to install or update Nano on Linux?
As we mentioned at the beginning, Nano is a utility that is present in most Linux distributions. If you are interested in having the new version, you should know that at the moment Nano 8.0 is not present in the repositories of most Linux distributions. The options to have the new version of Nano 8.0 are: compile nano from source code or wait for the update to be available for your distribution.
Compiling Nano from source code
For the first option that is to compile nano. You must open a terminal and type the following commands:
wget https://nano-editor.org/dist/v8/nano-8.0.tar.xz tar -xvf nano-8.0.tar.xz cd nano-8.0 ./configure --prefix=/usr \ --sysconfdir=/etc \ --enable-utf8 \ --docdir=/usr/share/doc/nano-8.0 make
Then, proceed to install Nano by running:
make install
Installation and/or update through repositories
If you prefer to wait for the packages to be created and available in the official repositories of your distribution, you can follow these steps depending on the distribution you are using. Ubuntu, Debian and Debian-based distributions:
sudo apt install nano
Fedora and Red Hat-based distributions:
sudo dnf install nano
Arch Linux and Arch-based distributions:
sudo pacman -S nano