Basic File Editing №103.8
- cmd
ed
is a line-oriented text editor
- Was one of the first parts of the Unix operating system developed by Ken
Thompson in August 1969.
- Remains part of the
POSIX
and
Open Group
standards.
- Still useful for automation processes from
stdin
.
- Online resources:
- cmd
vi
is a screen-oriented (visual) display editor
- Nowadays often an alias of (or link to) its 'successor' vim on
many 'modern' desktop operating systems, but is part of
POSIX.1-2008
and can be
found on literally every system.
- Online resources:
- cmd
vim
is vi improved
VIMawesome, a plugin aggregator
dark corners of vim
forum post at stackoverflow.com
- cmd
emacs
is an operating system by GNU Corp.
.. it lacks a good editor, though.
(Thomer M. Gil), but there are
numerous efforts undertaken to integrate mature and sane solutions like
vim
.
-
Repetitve Strain Injury entry in the EmacsWiki, stating that it is not
clear what causes it,
recommending foot switches for control keys and vi like key bindings.
man emacs(1)
- ah, no.. -
Emacs has its own manual system, called info
(?) and a program
called woman
within Emacs, short for
'without manual'
to not read manuals.
- Highlights: It has
orgmode
,
the most brilliant calendaring and GTD tool in this spiral arm of our
home galaxy.
- var
EDITOR
to not store emacs
in
- Environment variable to assign an editor of choice.
The assigned value to EDITOR
(i. e. ones choice
of an 'editor') should be executable inside a shell
and
should not have too many dependencies.
Important to some tools (like sudo and its derived
commands) as they rely on the default editor. E. g.:
$ EDITOR="vi"
$ echo $EDITOR
vi
Optionally include a qualified path (e. g.
EDITOR=${HOME}/.local/bin/vim)
if the chosen editor
cannot be found inside
$PATH
(i. e. installed somewhere else).
Optionally use export
(e. g. export
EDITOR=vi)
to let the variable get inherited by every following command
(e. g. invoked subshells).
May be used with env
(*e. g.*
env EDITOR=vim CMD)
to let the variable value (possibly among others) be valid for a certain
command CMD.
cmd edit
invokes the standard editor on most distributions, but the corresponding
systemwide $EDITOR
can only be set by root
var VISUAL
can also be set for
'visual' (i. e. non-line-oriented) editors,
since $EDITOR
originally was used to hold a line-oriented
editor (e. g. ed
)