If you ever have to work on a Linux system, it is well advised to have a basic knowledge of using the Vi
editor. As anecdotal evidence, read the blog Stack Overflow: Helping One Million Developers Exit Vim. This is not be confused with the editor war. Here I’m only highlighting the practical benefits of being familiar with Vi
.
- It is installed by default (seen as a standard system utility) and is available on all Linux distributions since it is part of the POSIX standard as well as the Single UNIX Specification. All other editors (including nano, emacs) are optional or additional installations.
- It is a lightweight application and can work in stripped down versions of Linux.
- It is a console based text editor which works without a Graphical User Interface. This comes in handy especially when logging into a machine remotely, which is quite common on Linux.
- It gets invoked by default in a number of shell commands like
man
,less
,git
etc.
As much as new users find it painful, some users get along fine with vi
in small doses. For those coming from a Windows background, learning vi/Vim by comparison with a typical GUI text editor is recommended.
Note that Vi
and Vim
(Vi IMproved) are not the same. Vim
is based on the Vi
editor, and is an extended version with many additional features. Vim
has nevertheless been described as “very much compatible with Vi
“. When possible, install Vim
which is an additional package. It is more “user friendly” than standard Vi
.