Previous: Emacs gid interface, Up: lid invocation
eid
: Invoking an Editor on Query Results
`lid -R edit' is an editing interface for the ID utilities that is
most commonly used with vi. Emacs users should use the interface
defined in idutils.el
(see Emacs gid interface). The ID
utilities include an alias called eid, and for the sake of
brevity, we'll use this alias for the remainder of this section.
eid performs a lid-style, then asks if you wish to edit
the files. If your query yields more than one line of output, you will
be prompted after each line. This is the prompt you'll see:
Edit? [y1-9^S/nq]
You may respond with:
Here is an example:
prompt$ eid FILE \^print FILE {ansi2knr,fid,filenames,idfile,idx,lid,misc,...}.c Edit? [y1-9^S/nq] n ^print {ansi2knr,fid,getopt,getopt1,lid,mkid,regex,scanners}.c Edit? [y1-9^S/nq] 2
This will start editing at getopt.c.
eid
invokes the editor defined by the environment variable
`VISUAL'. If `VISUAL' is undefined, it uses the environment
variable `EDITOR' instead. If `EDITOR' is undefined, it
defaults to vi. It is possible for eid to pass the editor
an initial search pattern so that your cursor will immediately alight on
the token of interest. This feature is controlled by the following
environment variables:
vi
, this should be `+/%s/'.
eid
inserts this in
front of the matching token when a word-search is desired. For
vi, this should be `\<'.
eid
inserts this in
end of the matching token when a word-search is desired. For
vi, this should be `\>'.