Text editor

A text editor is Article description::a program to create and edit text files. Although it is not impossible to edit files without using one, text editors make it easy to edit configuration files. The Gentoo @system set contains the package to make sure at least one editor is installed.

Available software
When talking about text editors for Gentoo tasks, three common possibilities spring to mind:

More text editor options can be found online in the app-editors category or by running:

Different "vi style" editors and /usr/bin/vi
Several "vi style" editors are available in Gentoo, such as and.

If Vim is installed, the and  commands become synonymous due to the following link:

The synonymous use also holds for setting editor defaults.

Use to manage this link, from the  package. can currently select between the following: vim, nvim, nvi, elvis, vile, gvim, qvim, xvile, pyvim, and busybox.

Visudo editor
Due to the sensitive nature of it may only edited via the  command which in turn is limited to a predefined selection of editors. Type for more information.

Setting system default
A system wide default text editor is defined in the file, for example:

The system default editor can be set with the utility, which modifies this file automatically. To list available editors:

To set a new editor, replace  in the following command with a number corresponding to the text editor of choice:

Next, the environment must be updated by running the following command:

User's EDITOR environment variable will now have the default value selected. Users may change this value however, in a running shell, or automatically on login shell startup.

The old method of setting the EDITOR variable in is no longer supported. See this article for details.