16 Dired— the Directory editor
In addition to editing files, jed is also able to rename and delete
them as well. jed's Dired mode allows one to do just this is a simple
and safe manner.
To run dired, simply press Esc X and enter dired
at the
prompt. jed will load dired.sl
and prompt for a directory name.
Once the directory is given, jed will display a list files in the
directory in a buffer named *dired*. One may use normal buffer
movement keys to move around this buffer. To delete one or more files,
use the d key to “tag” the files. This in itself does not delete
them; rather, it simply marks them for deleting. A capital `D' will
appear in the left margin to indicate that a file has been tagged. Simply
hit the u key to untag a file. The delete key will also untag the
previously tagged file.
To actually delete the tagged files, press the `x' key. This action
causes jed to display a list of the tagged files in a separate window
and prompt the user for confirmation. Only when the proper confirmation
is given, will the file be deleted.
Renaming a file is just as simple. Simply move to the line containg the
name of the file that you wish to rename and hit the `r' key. jed will
prompt for a filename or a directory name. If a directory is given, the
file will be moved to the new directory but will keep the name. However,
for the operation to succeed, the file must be one the same file system.
To rename tagged files to a different directory residing on the same file
system, use the m key. This has the effect of moving the tagged
file out of the current directory to the new one.
One may also use the f key to read the file indicated by the cursor
position into a buffer for editing. If the file is a directory, the
directory will be used for dired operations. In addition, one may also use
the v to simply “view” a file.
Finally, the g key will re-read the current directory and the
h and ? keys provide some help.