Nano or minimalistic IDE

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.

Nano or minimalistic IDE

Entry

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

Add a comment