Nano (GNU Text Editor)

botond published Jan. 2018, 06, 06:20 p.m. time

A GNU Nano a command line word processing program for Unix-like operating systems or operating environments. It emulates the Pico text editor, which is part of the Pine email client, and offers additional features. Unlike Pico, the Nano is licensed under the GNU General Public License (GPL). It was released as free software by Chris Allegretta in 1999 and became part of the GNU Project in 2001.

The editor originally appeared in TIP (TIP Isn't Pico) in 1999, then in 2000. was renamed to nano on January 10 to avoid a name conflict with the existing Unix program. The name comes from the system of SI prefixes, in which nano is 1000 times larger than pico.

GNU nano provides several features that Pico lacks, including syntax highlighting, number of lines, searching and replacing regular expressions, scrolling line by line, multiple buffering, group indentation of rows, support for changeable key combinations and undo / redo changes.

 

Source used:
Wikipedia

 

 

Installation

Installation is very simple, for example you only need to install one package on Debian APT package manager, as the distribution store contains:

apt-get install nano

On newer Debian systems, such as Debian 9, the installer package includes the editor by default.

 

Kezelés

GNU nano, like Pico, is keyboard-oriented, so you can control it with different key combinations. Some key combinations:

  • CTRL + G: Display help page
  • CTRL + O: Save
  • CTRL + R: Scan from file
  • CTRL + K: Cut whole line (and paste into program internal buffer)
  • CTRL+U: Paste the line stored in buffer
  • CTRL + W: Search
  • CTRL + X: Exit

 

Select any text, save it in a buffer, and paste it

The process is uncommon, but may often be needed during everyday use, so keep this in mind.

Use the arrow keys to position the cursor on the first character of the text you want to select, then press The ALT + keyboard. The program will switch to the selection mode. Then place the cursor on the last character of the segment (the inverse selection will then be displayed) and then press ALT + 6 key combination. The selection mode then exits and the affected part is added to the buffer. Finally, move the cursor to the position to be inserted and press the one mentioned above CTRL+U insert key combination.

The function works similarly to the copy-paste process that is common on Windows computers, but it has nothing to do with the clipboard, so if you use the machine from a Windows machine from a terminal, the copied content will not be copied to the clipboard.

Further switches and descriptions of the program can be found here nano manual archive we can find it.

 

Nanorc

The editor supports storing settings in the configuration file, so you can conveniently customize the program without having to specify switches each time you start. The config file must be in the user's home directory: ~ / .Nanorc

Here are some useful settings that you might want to set up:

set tabsize 4

We set the tab size to 4, which is common in most places, but in nano the 8 character setting is used.

set smooth

Fine scroll setting

set mouse

Turn on mouse support. This is a very useful feature.

set const

Continuously display current row, column and word number above menus.

For more information on all options, see Official site of GNU nano get information.