Usually it is safest to have stedi keep the original of a file as a
backup version when writing a buffer to file. This may not always be
possible due to diskspace limitations, so several options are offered.
The indicator showing which option is set is the seventh character of
the status bar and it is either a `B', a `b', or either a !, a !! or a
:
- B - Normal backup.
- If this option is selected, the original version of the file is
first moved to a file with the same name but now with the extension
.bak before the writing takes place. This .bak file is a normal
visible file. This is the default mode.
- b - Hidden backup.
- If this option is selected, the original version of the file is
first moved to a file with the same name but with the extension .bak
as in the previous case, before the writing takes place. The
difference is that this .bak file is a hidden file so it will not be
seen in normal listings of the contents of the disk. The advantage
of this setting is apparent when running the editor from a shell
program in which the invisible files can be seen or hidden at will,
so that the screen needn't be unnecessarily cluttered with files. In
some environments however, the invisible files are usually
really hidden and can only be removed or copied when the action is
taken on the whole directory which contains them.
- ! or !! or - No backup.
- This is a rather dangerous mode, as the old version of the file is
removed before the new version is written. This can result in loss
of data if anything goes wrong (like badly malfunctioning floppy
disks). The advantage of this mode comes when there is not enough
diskspace for both the file and its backup together. Caution is
recommended when using this mode.
The backup mode can only be toggled from the keyboard with the Alt-B key combination. It is also stored in the default file. All that
has been said above concerning backups is invalid when the `View-Only'
mode has been activated: