GNU nano 5.9 Text Editor Comes with YAML Syntax Highlighting Support

The legendary open source text editor GNU nano has released version 5.9. Take a look at what features this new release brings.

Nano is a simple command-line text editor inspired by Pico and included by default in the most Linux distributions. It aimed to “emulate Pico as closely as is reasonable and then include extra functionality”. Released as free software by Chris Allegretta in 1999, today nano is part of the GNU Project.

Besides basic text editing, nano offers features like undo/redo, syntax highlighting, interactive search-and-replace, auto-indentation, line numbers, word completion, file locking, backup files, and internationalization support.

Related: Micro Text Editor: Lightweight and Intuitive Terminal-Based Editor

Nano is an editor that prioritizes a low learning curve and ease of use. It’s most useful for people who don’t spend enough time in editors to merit learning something more powerful or versatile.

Related: Differences Between Vi And Vim Text Editors Explained

What’s New in GNU nano 5.9

The nano editor provides syntax highlighting for a few languages and scripts by itself. You can discover which languages are available in nano to highlight its syntax by checking the contents of the /usr/share/nano/ directory.

The new update, called “El manicomio ha decidido: mañana sol!”, adds syntax highlighting for YAML files.

To enable syntax highlighting in nano, link them to your user’s nano configuration file ~/.nanorc. For example, to enable PHP syntax highlighting:

include /usr/share/nano/php.nanorcCode language: PHP (php)
GNU nano 5.9 Text Editor Syntax Highlighting

In nano 5.9 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’).

Another useful innovation in nano 5.9 is that now 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.

Furthermore undoing a cutting operation in nano 5.9 will restore an anchor that was located in the cut area to its original line. Also when using --locking, saving a new buffer will create a lock file.

A full changelog for the new update can be found here and downloads are available here.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%

Leave a Reply

Your email address will not be published. Required fields are marked *