In this article, I would like to show you the power and beauty of the nano console text editor, simple and inconspicuous at first glance.

Prologue
In fact, the developers have prepared a lot of useful things for you, which you may not even be aware of, for example: auto-indentation, switching to a pair of brackets, and even auto-substitution! Let's go in order.
Standard hotkeys
M - modifier key (Alt by default); ^ - Control;
Selection with Shift+Arrow.
Most helpful in my opinion| ^ | замена, возможна множественная, выборочная и полная
| ^w | поиск
| ^k | вырезает строку, на которой стоит курсор, или выделенную часть текста
| ^u | вставить
|^⍇⍈⍐⍗| перескакивает на следующее слово или абзац.
| ^Y | переносит курсор в начало файла
| ^] |заканчивает слово, при повторном нажатии подставляет другой вариант(автодополнение)
| ^c | сведения о положении курсора
|M-⍇⍈ | перемещение между открытыми буферами(вкладками)
|M-⍐⍗ | плавная прокрутка
| M-u | отмена ( действует пока есть что отменять) )
| M-] | на парную скобку
| M-n | вклвыкл нумерацию строк (полезно при копипасте)
| M-i | вклвыкл автоотступы
Hope I didn't forget anything...
configs
Let's get down to the sweetest thing ... Agree that without editing configs, Linux is no longer Linux.
So, the main config is in /etc/nanorc, for syntax highlighting - in /usr/share/nano/*
Basically, you can do a lot of interesting things,
for example| set autoindent | включает автоотступы
| set backup | включает создание резервных копий
| set mouse | включает поддержку мыши (с ней гораздо удобней)
| set multibuffer | разрешает копипаст из одного файлового буфера(вкладки) nano в другой
| set nohelp | выключает подсказки снизу, увеличивая полезное пространство
| set tabsize N | устанавливает размер табуляций N
|set tabstospaces| конвертирует табуляции в пробелы
| bind|unbind | изменяет горячие клавиши
In the config for the syntax, you can set / change colors
сolor <название цвета> <"регулярное выражение">
Although it will be better if you yourself plunge into it and do everything as you need.
By the way, it is better to copy the necessary configs to your home folder so that they are not overwritten after each update.
Conclusion
As you can see, nano has a fairly rich functionality and is easy to deeply customize for yourself.
Good luck!
Source: habr.com
